use of io.kubernetes.client.openapi.models.V1beta1ClusterRole in project pravega by pravega.
the class K8sClient method createClusterRole.
/**
* Create a cluster role.
* @param role Cluster Role.
* @return A future indicating the status of this operation.
*/
@SneakyThrows(ApiException.class)
public CompletableFuture<V1beta1ClusterRole> createClusterRole(V1beta1ClusterRole role) {
RbacAuthorizationV1beta1Api api = new RbacAuthorizationV1beta1Api();
K8AsyncCallback<V1beta1ClusterRole> callback = new K8AsyncCallback<>("createClusterRole-" + role.getMetadata().getName());
api.createClusterRoleAsync(role, PRETTY_PRINT, DRY_RUN, FIELD_MANAGER, callback);
return exceptionallyExpecting(callback.getFuture(), isConflict, null);
}
Aggregations