Interface LeaderElectionConfiguration
- All Superinterfaces:
io.micronaut.core.util.Toggleable
@Internal
@ConfigurationProperties("kubernetes.client.operator.leader-election.lock")
public interface LeaderElectionConfiguration
extends io.micronaut.core.util.Toggleable
The leader election configuration.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe lock lease duration.The lock renew deadline.The lock resource name.The lock resource namespace.The lock acquire retry period.Methods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_LEASE_DURATION
- See Also:
-
DEFAULT_RENEW_DEADLINE
- See Also:
-
DEFAULT_RETRY_PERIOD
- See Also:
-
-
Method Details
-
getLeaseDuration
The lock lease duration. Default "10s".- Returns:
- lease duration
-
getRenewDeadline
The lock renew deadline. If the leader elector fails to renew the lock within the deadline, then the controller loses the lock. Default "8s".- Returns:
- renew deadline
-
getRetryPeriod
The lock acquire retry period. Default "5s".- Returns:
- lock acquire retry period.
-
getResourceName
The lock resource name. If not provided then the application name is used.- Returns:
- the lock resource name
-
getResourceNamespace
The lock resource namespace. If not provided then the application namespace is used.- Returns:
- the lock resource namespace
-