Search in sources :

Example 1 with V1beta1ClusterRoleBinding

use of io.kubernetes.client.openapi.models.V1beta1ClusterRoleBinding in project pravega by pravega.

the class K8sClient method createClusterRoleBinding.

/**
 * Create cluster role binding.
 * @param binding The cluster role binding.
 * @return A future indicating the status of the create role binding operation.
 */
@SneakyThrows(ApiException.class)
public CompletableFuture<V1beta1ClusterRoleBinding> createClusterRoleBinding(V1beta1ClusterRoleBinding binding) {
    RbacAuthorizationV1beta1Api api = new RbacAuthorizationV1beta1Api();
    K8AsyncCallback<V1beta1ClusterRoleBinding> callback = new K8AsyncCallback<>("createClusterRoleBinding-" + binding.getMetadata().getName());
    api.createClusterRoleBindingAsync(binding, PRETTY_PRINT, DRY_RUN, FIELD_MANAGER, callback);
    return exceptionallyExpecting(callback.getFuture(), isConflict, null);
}
Also used : V1beta1ClusterRoleBinding(io.kubernetes.client.openapi.models.V1beta1ClusterRoleBinding) RbacAuthorizationV1beta1Api(io.kubernetes.client.openapi.apis.RbacAuthorizationV1beta1Api) SneakyThrows(lombok.SneakyThrows)

Aggregations

RbacAuthorizationV1beta1Api (io.kubernetes.client.openapi.apis.RbacAuthorizationV1beta1Api)1 V1beta1ClusterRoleBinding (io.kubernetes.client.openapi.models.V1beta1ClusterRoleBinding)1 SneakyThrows (lombok.SneakyThrows)1