Class ThanosSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.ThanosSpec
-
- All Implemented Interfaces:
Editable<ThanosSpecBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ThanosSpec extends Object implements Editable<ThanosSpecBuilder>, KubernetesResource
ThanosSpec defines the configuration of the Thanos sidecar.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ThanosSpec()No args constructor for use in serializationThanosSpec(List<Argument> additionalArgs, String baseImage, String blockSize, String getConfigInterval, String getConfigTimeout, Boolean grpcListenLocal, GRPCServerTLSConfig grpcServerTlsConfig, Boolean httpListenLocal, String image, Boolean listenLocal, String logFormat, String logLevel, String minTime, SecretKeySelector objectStorageConfig, String objectStorageConfigFile, String readyTimeout, ResourceRequirements resources, String sha, String tag, SecretKeySelector tracingConfig, String tracingConfigFile, String version, List<VolumeMount> volumeMounts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThanosSpecBuilderedit()List<Argument>getAdditionalArgs()additionalArgs allows setting additional arguments for the Thanos container.Map<String,Object>getAdditionalProperties()StringgetBaseImage()baseImage is deprecated: use 'image' instead.StringgetBlockSize()blockSize controls the size of TSDB blocks produced by Prometheus.StringgetGetConfigInterval()getConfigInterval defines how often to retrieve the Prometheus configuration.StringgetGetConfigTimeout()getConfigTimeout defines the maximum time to wait when retrieving the Prometheus configuration.BooleangetGrpcListenLocal()grpcListenLocal defines when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the gRPC endpoints.GRPCServerTLSConfiggetGrpcServerTlsConfig()ThanosSpec defines the configuration of the Thanos sidecar.BooleangetHttpListenLocal()httpListenLocal when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the HTTP endpoints.StringgetImage()image defines the container image name for Thanos.BooleangetListenLocal()listenLocal is deprecated: use `grpcListenLocal` and `httpListenLocal` instead.StringgetLogFormat()logFormat for the Thanos sidecar.StringgetLogLevel()logLevel for the Thanos sidecar.StringgetMinTime()minTime defines the start of time range limit served by the Thanos sidecar's StoreAPI.SecretKeySelectorgetObjectStorageConfig()ThanosSpec defines the configuration of the Thanos sidecar.StringgetObjectStorageConfigFile()objectStorageConfigFile defines the Thanos sidecar's configuration file to upload TSDB blocks to object storage.StringgetReadyTimeout()readyTimeout defines the maximum time that the Thanos sidecar will wait for Prometheus to start.ResourceRequirementsgetResources()ThanosSpec defines the configuration of the Thanos sidecar.StringgetSha()sha is deprecated: use 'image' instead.StringgetTag()tag is deprecated: use 'image' instead.SecretKeySelectorgetTracingConfig()ThanosSpec defines the configuration of the Thanos sidecar.StringgetTracingConfigFile()tracingConfigFile defines the tracing configuration file for the Thanos sidecar.StringgetVersion()version of Thanos being deployed.List<VolumeMount>getVolumeMounts()volumeMounts allows configuration of additional VolumeMounts for Thanos.voidsetAdditionalArgs(List<Argument> additionalArgs)additionalArgs allows setting additional arguments for the Thanos container.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetBaseImage(String baseImage)baseImage is deprecated: use 'image' instead.voidsetBlockSize(String blockSize)blockSize controls the size of TSDB blocks produced by Prometheus.voidsetGetConfigInterval(String getConfigInterval)getConfigInterval defines how often to retrieve the Prometheus configuration.voidsetGetConfigTimeout(String getConfigTimeout)getConfigTimeout defines the maximum time to wait when retrieving the Prometheus configuration.voidsetGrpcListenLocal(Boolean grpcListenLocal)grpcListenLocal defines when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the gRPC endpoints.voidsetGrpcServerTlsConfig(GRPCServerTLSConfig grpcServerTlsConfig)ThanosSpec defines the configuration of the Thanos sidecar.voidsetHttpListenLocal(Boolean httpListenLocal)httpListenLocal when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the HTTP endpoints.voidsetImage(String image)image defines the container image name for Thanos.voidsetListenLocal(Boolean listenLocal)listenLocal is deprecated: use `grpcListenLocal` and `httpListenLocal` instead.voidsetLogFormat(String logFormat)logFormat for the Thanos sidecar.voidsetLogLevel(String logLevel)logLevel for the Thanos sidecar.voidsetMinTime(String minTime)minTime defines the start of time range limit served by the Thanos sidecar's StoreAPI.voidsetObjectStorageConfig(SecretKeySelector objectStorageConfig)ThanosSpec defines the configuration of the Thanos sidecar.voidsetObjectStorageConfigFile(String objectStorageConfigFile)objectStorageConfigFile defines the Thanos sidecar's configuration file to upload TSDB blocks to object storage.voidsetReadyTimeout(String readyTimeout)readyTimeout defines the maximum time that the Thanos sidecar will wait for Prometheus to start.voidsetResources(ResourceRequirements resources)ThanosSpec defines the configuration of the Thanos sidecar.voidsetSha(String sha)sha is deprecated: use 'image' instead.voidsetTag(String tag)tag is deprecated: use 'image' instead.voidsetTracingConfig(SecretKeySelector tracingConfig)ThanosSpec defines the configuration of the Thanos sidecar.voidsetTracingConfigFile(String tracingConfigFile)tracingConfigFile defines the tracing configuration file for the Thanos sidecar.voidsetVersion(String version)version of Thanos being deployed.voidsetVolumeMounts(List<VolumeMount> volumeMounts)volumeMounts allows configuration of additional VolumeMounts for Thanos.ThanosSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
ThanosSpec
public ThanosSpec()
No args constructor for use in serialization
-
ThanosSpec
public ThanosSpec(List<Argument> additionalArgs, String baseImage, String blockSize, String getConfigInterval, String getConfigTimeout, Boolean grpcListenLocal, GRPCServerTLSConfig grpcServerTlsConfig, Boolean httpListenLocal, String image, Boolean listenLocal, String logFormat, String logLevel, String minTime, SecretKeySelector objectStorageConfig, String objectStorageConfigFile, String readyTimeout, ResourceRequirements resources, String sha, String tag, SecretKeySelector tracingConfig, String tracingConfigFile, String version, List<VolumeMount> volumeMounts)
-
-
Method Detail
-
getAdditionalArgs
public List<Argument> getAdditionalArgs()
additionalArgs allows setting additional arguments for the Thanos container. The arguments are passed as-is to the Thanos container which may cause issues if they are invalid or not supported the given Thanos version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.
-
setAdditionalArgs
public void setAdditionalArgs(List<Argument> additionalArgs)
additionalArgs allows setting additional arguments for the Thanos container. The arguments are passed as-is to the Thanos container which may cause issues if they are invalid or not supported the given Thanos version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.
-
getBaseImage
public String getBaseImage()
baseImage is deprecated: use 'image' instead.
-
setBaseImage
public void setBaseImage(String baseImage)
baseImage is deprecated: use 'image' instead.
-
getBlockSize
public String getBlockSize()
blockSize controls the size of TSDB blocks produced by Prometheus. The default value is 2h to match the upstream Prometheus defaults.WARNING: Changing the block duration can impact the performance and efficiency of the entire Prometheus/Thanos stack due to how it interacts with memory and Thanos compactors. It is recommended to keep this value set to a multiple of 120 times your longest scrape or rule interval. For example, 30s * 120 = 1h.
-
setBlockSize
public void setBlockSize(String blockSize)
blockSize controls the size of TSDB blocks produced by Prometheus. The default value is 2h to match the upstream Prometheus defaults.WARNING: Changing the block duration can impact the performance and efficiency of the entire Prometheus/Thanos stack due to how it interacts with memory and Thanos compactors. It is recommended to keep this value set to a multiple of 120 times your longest scrape or rule interval. For example, 30s * 120 = 1h.
-
getGetConfigInterval
public String getGetConfigInterval()
getConfigInterval defines how often to retrieve the Prometheus configuration.
-
setGetConfigInterval
public void setGetConfigInterval(String getConfigInterval)
getConfigInterval defines how often to retrieve the Prometheus configuration.
-
getGetConfigTimeout
public String getGetConfigTimeout()
getConfigTimeout defines the maximum time to wait when retrieving the Prometheus configuration.
-
setGetConfigTimeout
public void setGetConfigTimeout(String getConfigTimeout)
getConfigTimeout defines the maximum time to wait when retrieving the Prometheus configuration.
-
getGrpcListenLocal
public Boolean getGrpcListenLocal()
grpcListenLocal defines when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the gRPC endpoints.It has no effect if `listenLocal` is true.
-
setGrpcListenLocal
public void setGrpcListenLocal(Boolean grpcListenLocal)
grpcListenLocal defines when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the gRPC endpoints.It has no effect if `listenLocal` is true.
-
getGrpcServerTlsConfig
public GRPCServerTLSConfig getGrpcServerTlsConfig()
ThanosSpec defines the configuration of the Thanos sidecar.
-
setGrpcServerTlsConfig
public void setGrpcServerTlsConfig(GRPCServerTLSConfig grpcServerTlsConfig)
ThanosSpec defines the configuration of the Thanos sidecar.
-
getHttpListenLocal
public Boolean getHttpListenLocal()
httpListenLocal when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the HTTP endpoints.It has no effect if `listenLocal` is true.
-
setHttpListenLocal
public void setHttpListenLocal(Boolean httpListenLocal)
httpListenLocal when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP's address for the HTTP endpoints.It has no effect if `listenLocal` is true.
-
getImage
public String getImage()
image defines the container image name for Thanos. If specified, it takes precedence over the `spec.thanos.baseImage`, `spec.thanos.tag` and `spec.thanos.sha` fields.Specifying `spec.thanos.version` is still necessary to ensure the Prometheus Operator knows which version of Thanos is being configured.
If neither `spec.thanos.image` nor `spec.thanos.baseImage` are defined, the operator will use the latest upstream version of Thanos available at the time when the operator was released.
-
setImage
public void setImage(String image)
image defines the container image name for Thanos. If specified, it takes precedence over the `spec.thanos.baseImage`, `spec.thanos.tag` and `spec.thanos.sha` fields.Specifying `spec.thanos.version` is still necessary to ensure the Prometheus Operator knows which version of Thanos is being configured.
If neither `spec.thanos.image` nor `spec.thanos.baseImage` are defined, the operator will use the latest upstream version of Thanos available at the time when the operator was released.
-
getListenLocal
public Boolean getListenLocal()
listenLocal is deprecated: use `grpcListenLocal` and `httpListenLocal` instead.
-
setListenLocal
public void setListenLocal(Boolean listenLocal)
listenLocal is deprecated: use `grpcListenLocal` and `httpListenLocal` instead.
-
getLogFormat
public String getLogFormat()
logFormat for the Thanos sidecar.
-
setLogFormat
public void setLogFormat(String logFormat)
logFormat for the Thanos sidecar.
-
getLogLevel
public String getLogLevel()
logLevel for the Thanos sidecar.
-
setLogLevel
public void setLogLevel(String logLevel)
logLevel for the Thanos sidecar.
-
getMinTime
public String getMinTime()
minTime defines the start of time range limit served by the Thanos sidecar's StoreAPI. The field's value should be a constant time in RFC3339 format or a time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
-
setMinTime
public void setMinTime(String minTime)
minTime defines the start of time range limit served by the Thanos sidecar's StoreAPI. The field's value should be a constant time in RFC3339 format or a time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
-
getObjectStorageConfig
public SecretKeySelector getObjectStorageConfig()
ThanosSpec defines the configuration of the Thanos sidecar.
-
setObjectStorageConfig
public void setObjectStorageConfig(SecretKeySelector objectStorageConfig)
ThanosSpec defines the configuration of the Thanos sidecar.
-
getObjectStorageConfigFile
public String getObjectStorageConfigFile()
objectStorageConfigFile defines the Thanos sidecar's configuration file to upload TSDB blocks to object storage.More info: https://thanos.io/tip/thanos/storage.md/
This field takes precedence over objectStorageConfig.
-
setObjectStorageConfigFile
public void setObjectStorageConfigFile(String objectStorageConfigFile)
objectStorageConfigFile defines the Thanos sidecar's configuration file to upload TSDB blocks to object storage.More info: https://thanos.io/tip/thanos/storage.md/
This field takes precedence over objectStorageConfig.
-
getReadyTimeout
public String getReadyTimeout()
readyTimeout defines the maximum time that the Thanos sidecar will wait for Prometheus to start.
-
setReadyTimeout
public void setReadyTimeout(String readyTimeout)
readyTimeout defines the maximum time that the Thanos sidecar will wait for Prometheus to start.
-
getResources
public ResourceRequirements getResources()
ThanosSpec defines the configuration of the Thanos sidecar.
-
setResources
public void setResources(ResourceRequirements resources)
ThanosSpec defines the configuration of the Thanos sidecar.
-
getSha
public String getSha()
sha is deprecated: use 'image' instead. The image digest can be specified as part of the image name.
-
setSha
public void setSha(String sha)
sha is deprecated: use 'image' instead. The image digest can be specified as part of the image name.
-
getTag
public String getTag()
tag is deprecated: use 'image' instead. The image's tag can be specified as as part of the image name.
-
setTag
public void setTag(String tag)
tag is deprecated: use 'image' instead. The image's tag can be specified as as part of the image name.
-
getTracingConfig
public SecretKeySelector getTracingConfig()
ThanosSpec defines the configuration of the Thanos sidecar.
-
setTracingConfig
public void setTracingConfig(SecretKeySelector tracingConfig)
ThanosSpec defines the configuration of the Thanos sidecar.
-
getTracingConfigFile
public String getTracingConfigFile()
tracingConfigFile defines the tracing configuration file for the Thanos sidecar.This field takes precedence over `tracingConfig`.
More info: https://thanos.io/tip/thanos/tracing.md/
This is an *experimental feature*, it may change in any upcoming release in a breaking way.
-
setTracingConfigFile
public void setTracingConfigFile(String tracingConfigFile)
tracingConfigFile defines the tracing configuration file for the Thanos sidecar.This field takes precedence over `tracingConfig`.
More info: https://thanos.io/tip/thanos/tracing.md/
This is an *experimental feature*, it may change in any upcoming release in a breaking way.
-
getVersion
public String getVersion()
version of Thanos being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.If not specified, the operator assumes the latest upstream release of Thanos available at the time when the version of the operator was released.
-
setVersion
public void setVersion(String version)
version of Thanos being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.If not specified, the operator assumes the latest upstream release of Thanos available at the time when the version of the operator was released.
-
getVolumeMounts
public List<VolumeMount> getVolumeMounts()
volumeMounts allows configuration of additional VolumeMounts for Thanos. VolumeMounts specified will be appended to other VolumeMounts in the 'thanos-sidecar' container.
-
setVolumeMounts
public void setVolumeMounts(List<VolumeMount> volumeMounts)
volumeMounts allows configuration of additional VolumeMounts for Thanos. VolumeMounts specified will be appended to other VolumeMounts in the 'thanos-sidecar' container.
-
edit
public ThanosSpecBuilder edit()
- Specified by:
editin interfaceEditable<ThanosSpecBuilder>
-
toBuilder
public ThanosSpecBuilder toBuilder()
-
-