Search in sources :

Example 1 with CoordinationV1Api

use of io.kubernetes.client.openapi.apis.CoordinationV1Api in project java by kubernetes-client.

the class LeaderElectorTest method deleteLeaseLockResource.

private void deleteLeaseLockResource() throws Exception {
    try {
        CoordinationV1Api coordinationV1Api = new CoordinationV1Api(apiClient);
        coordinationV1Api.deleteNamespacedLease(LOCK_RESOURCE_NAME, NAMESPACE, null, null, null, null, null, null);
    } catch (ApiException ex) {
        if (ex.getCode() != HttpURLConnection.HTTP_NOT_FOUND) {
            throw ex;
        }
    }
}
Also used : CoordinationV1Api(io.kubernetes.client.openapi.apis.CoordinationV1Api) ApiException(io.kubernetes.client.openapi.ApiException)

Aggregations

ApiException (io.kubernetes.client.openapi.ApiException)1 CoordinationV1Api (io.kubernetes.client.openapi.apis.CoordinationV1Api)1