Class ResourceLockFactory
java.lang.Object
io.micronaut.kubernetes.client.operator.leaderelection.ResourceLockFactory
The factory that creates the official Kubernetes SDK provided
Lock
implementations.- Since:
- 3.3
- Author:
- Pavol Gressa
-
Constructor Summary
ConstructorDescriptionResourceLockFactory
(LockIdentityProvider lockIdentityProvider, NamespaceResolver namespaceResolver, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, LeaderElectionConfiguration leaderElectionConfiguration, io.kubernetes.client.openapi.ApiClient apiClient) -
Method Summary
Modifier and TypeMethodDescriptionio.kubernetes.client.extended.leaderelection.resourcelock.ConfigMapLock
Creates theConfigMapLock
.io.kubernetes.client.extended.leaderelection.resourcelock.EndpointsLock
Creates theEndpointsLock
.io.kubernetes.client.extended.leaderelection.resourcelock.LeaseLock
Creates theLeaseLock
.
-
Constructor Details
-
ResourceLockFactory
public ResourceLockFactory(LockIdentityProvider lockIdentityProvider, NamespaceResolver namespaceResolver, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, LeaderElectionConfiguration leaderElectionConfiguration, io.kubernetes.client.openapi.ApiClient apiClient)
-
-
Method Details
-
configMapLock
@Requires(property="kubernetes.client.operator.leader-election.lock.resource-kind", value="configmap") @Primary @Singleton public io.kubernetes.client.extended.leaderelection.resourcelock.ConfigMapLock configMapLock()Creates theConfigMapLock
.- Returns:
- config map lock
-
endpointsLock
@Requires(property="kubernetes.client.operator.leader-election.lock.resource-kind", value="endpoints") @Primary @Singleton public io.kubernetes.client.extended.leaderelection.resourcelock.EndpointsLock endpointsLock()Creates theEndpointsLock
.- Returns:
- the endpoints lock
-
leaseLock
@Requires(property="kubernetes.client.operator.leader-election.lock.resource-kind", value="lease", defaultValue="lease") @Secondary @Singleton public io.kubernetes.client.extended.leaderelection.resourcelock.LeaseLock leaseLock()Creates theLeaseLock
.- Returns:
- the lease lock
-