Record Class ConfigReloadProperties
java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.config.reload.ConfigReloadProperties
- Record Components:
enabled- Enables the Kubernetes configuration reload on change.monitoringConfigMaps- Enables monitoring on secrets to detect changes.monitoringSecrets- Monitor secrets or not.strategy- Sets reload strategy for Kubernetes configuration reload on change.mode- Sets the detection mode for Kubernetes configuration reload.period- Sets the polling period to use when the detection mode is POLLING.namespaces- namespaces where an informer will be set-up. this property is only relevant for event based reloading.enableReloadFiltering- create an informer only for sources that have 'spring.cloud.kubernetes.config.informer.enabled=true' label. This property is only relevant for event based reloading.maxWaitForRestart- Restart or Shutdown strategies are used, Spring Cloud Kubernetes waits a random amount of time before restarting. This is done in order to avoid having all instances of the same application restart at the same time. This property configures the maximum of amount of wait time from the moment the signal is received that a restart is needed until the moment the restart is actually triggered
@ConfigurationProperties(prefix="spring.cloud.kubernetes.reload")
public record ConfigReloadProperties(boolean enabled, boolean monitoringConfigMaps, boolean monitoringSecrets, ConfigReloadProperties.ReloadStrategy strategy, ConfigReloadProperties.ReloadDetectionMode mode, Duration period, Set<String> namespaces, boolean enableReloadFiltering, Duration maxWaitForRestart)
extends Record
General configuration for the configuration reload.
- Author:
- Nicola Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumReload detection modes.static enumReload strategies. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ConfigReloadPropertiesdefault instance.static final Stringlabel for filtering sources. -
Constructor Summary
ConstructorsConstructorDescriptionConfigReloadProperties(boolean enabled, boolean monitoringConfigMaps, boolean monitoringSecrets, ConfigReloadProperties.ReloadStrategy strategy, ConfigReloadProperties.ReloadDetectionMode mode, Duration period, Set<String> namespaces, boolean enableReloadFiltering, Duration maxWaitForRestart) Creates an instance of aConfigReloadPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.booleanReturns the value of theenableReloadFilteringrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxWaitForRestartrecord component.mode()Returns the value of themoderecord component.booleanReturns the value of themonitoringConfigMapsrecord component.booleanReturns the value of themonitoringSecretsrecord component.Returns the value of thenamespacesrecord component.period()Returns the value of theperiodrecord component.strategy()Returns the value of thestrategyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
default instance. -
RELOAD_LABEL_FILTER
-
-
Constructor Details
-
ConfigReloadProperties
public ConfigReloadProperties(boolean enabled, @DefaultValue("true") boolean monitoringConfigMaps, boolean monitoringSecrets, @DefaultValue("REFRESH") ConfigReloadProperties.ReloadStrategy strategy, @DefaultValue("EVENT") ConfigReloadProperties.ReloadDetectionMode mode, @DefaultValue("15000ms") Duration period, @DefaultValue Set<String> namespaces, boolean enableReloadFiltering, @DefaultValue("2s") Duration maxWaitForRestart) Creates an instance of aConfigReloadPropertiesrecord class.- Parameters:
enabled- the value for theenabledrecord componentmonitoringConfigMaps- the value for themonitoringConfigMapsrecord componentmonitoringSecrets- the value for themonitoringSecretsrecord componentstrategy- the value for thestrategyrecord componentmode- the value for themoderecord componentperiod- the value for theperiodrecord componentnamespaces- the value for thenamespacesrecord componentenableReloadFiltering- the value for theenableReloadFilteringrecord componentmaxWaitForRestart- the value for themaxWaitForRestartrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enabled
-
monitoringConfigMaps
public boolean monitoringConfigMaps()Returns the value of themonitoringConfigMapsrecord component.- Returns:
- the value of the
monitoringConfigMapsrecord component
-
monitoringSecrets
public boolean monitoringSecrets()Returns the value of themonitoringSecretsrecord component.- Returns:
- the value of the
monitoringSecretsrecord component
-
strategy
-
mode
-
period
-
namespaces
Returns the value of thenamespacesrecord component.- Returns:
- the value of the
namespacesrecord component
-
enableReloadFiltering
public boolean enableReloadFiltering()Returns the value of theenableReloadFilteringrecord component.- Returns:
- the value of the
enableReloadFilteringrecord component
-
maxWaitForRestart
Returns the value of themaxWaitForRestartrecord component.- Returns:
- the value of the
maxWaitForRestartrecord component
-