Class ThanosSpec

  • All Implemented Interfaces:
    io.fabric8.kubernetes.api.builder.Editable<ThanosSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource, Serializable

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class ThanosSpec
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<ThanosSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    ThanosSpec defines the configuration of the Thanos sidecar.
    See Also:
    Serialized Form
    • 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,
                          TLSConfig grpcServerTlsConfig,
                          Boolean httpListenLocal,
                          String image,
                          Boolean listenLocal,
                          String logFormat,
                          String logLevel,
                          String minTime,
                          io.fabric8.kubernetes.api.model.SecretKeySelector objectStorageConfig,
                          String objectStorageConfigFile,
                          String readyTimeout,
                          io.fabric8.kubernetes.api.model.ResourceRequirements resources,
                          String sha,
                          String tag,
                          io.fabric8.kubernetes.api.model.SecretKeySelector tracingConfig,
                          String tracingConfigFile,
                          String version,
                          List<io.fabric8.kubernetes.api.model.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()
        Deprecated: use 'image' instead.
      • setBaseImage

        public void setBaseImage​(String baseImage)
        Deprecated: use 'image' instead.
      • getBlockSize

        public String getBlockSize()
        BlockDuration 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)
        BlockDuration 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()
        How often to retrieve the Prometheus configuration.
      • setGetConfigInterval

        public void setGetConfigInterval​(String getConfigInterval)
        How often to retrieve the Prometheus configuration.
      • getGetConfigTimeout

        public String getGetConfigTimeout()
        Maximum time to wait when retrieving the Prometheus configuration.
      • setGetConfigTimeout

        public void setGetConfigTimeout​(String getConfigTimeout)
        Maximum time to wait when retrieving the Prometheus configuration.
      • getGrpcListenLocal

        public Boolean getGrpcListenLocal()
        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)
        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 TLSConfig getGrpcServerTlsConfig()
        ThanosSpec defines the configuration of the Thanos sidecar.
      • setGrpcServerTlsConfig

        public void setGrpcServerTlsConfig​(TLSConfig grpcServerTlsConfig)
        ThanosSpec defines the configuration of the Thanos sidecar.
      • getHttpListenLocal

        public Boolean getHttpListenLocal()
        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)
        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()
        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)
        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()
        Deprecated: use `grpcListenLocal` and `httpListenLocal` instead.
      • setListenLocal

        public void setListenLocal​(Boolean listenLocal)
        Deprecated: use `grpcListenLocal` and `httpListenLocal` instead.
      • getLogFormat

        public String getLogFormat()
        Log format for the Thanos sidecar.
      • setLogFormat

        public void setLogFormat​(String logFormat)
        Log format for the Thanos sidecar.
      • getLogLevel

        public String getLogLevel()
        Log level for the Thanos sidecar.
      • setLogLevel

        public void setLogLevel​(String logLevel)
        Log level for the Thanos sidecar.
      • getMinTime

        public String getMinTime()
        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)
        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 io.fabric8.kubernetes.api.model.SecretKeySelector getObjectStorageConfig()
        ThanosSpec defines the configuration of the Thanos sidecar.
      • setObjectStorageConfig

        public void setObjectStorageConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector objectStorageConfig)
        ThanosSpec defines the configuration of the Thanos sidecar.
      • getObjectStorageConfigFile

        public String getObjectStorageConfigFile()
        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)
        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 is the maximum time that the Thanos sidecar will wait for Prometheus to start.
      • setReadyTimeout

        public void setReadyTimeout​(String readyTimeout)
        ReadyTimeout is the maximum time that the Thanos sidecar will wait for Prometheus to start.
      • getResources

        public io.fabric8.kubernetes.api.model.ResourceRequirements getResources()
        ThanosSpec defines the configuration of the Thanos sidecar.
      • setResources

        public void setResources​(io.fabric8.kubernetes.api.model.ResourceRequirements resources)
        ThanosSpec defines the configuration of the Thanos sidecar.
      • getSha

        public String getSha()
        Deprecated: use 'image' instead. The image digest can be specified as part of the image name.
      • setSha

        public void setSha​(String sha)
        Deprecated: use 'image' instead. The image digest can be specified as part of the image name.
      • getTag

        public String getTag()
        Deprecated: use 'image' instead. The image's tag can be specified as as part of the image name.
      • setTag

        public void setTag​(String tag)
        Deprecated: use 'image' instead. The image's tag can be specified as as part of the image name.
      • getTracingConfig

        public io.fabric8.kubernetes.api.model.SecretKeySelector getTracingConfig()
        ThanosSpec defines the configuration of the Thanos sidecar.
      • setTracingConfig

        public void setTracingConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector tracingConfig)
        ThanosSpec defines the configuration of the Thanos sidecar.
      • getTracingConfigFile

        public String getTracingConfigFile()
        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)
        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<io.fabric8.kubernetes.api.model.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<io.fabric8.kubernetes.api.model.VolumeMount> volumeMounts)
        VolumeMounts allows configuration of additional VolumeMounts for Thanos. VolumeMounts specified will be appended to other VolumeMounts in the 'thanos-sidecar' container.
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)