Class ThanosRulerSpec

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

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class ThanosRulerSpec
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<ThanosRulerSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    See Also:
    Serialized Form
    • Constructor Detail

      • ThanosRulerSpec

        public ThanosRulerSpec()
        No args constructor for use in serialization
      • ThanosRulerSpec

        public ThanosRulerSpec​(List<Argument> additionalArgs,
                               io.fabric8.kubernetes.api.model.Affinity affinity,
                               List<String> alertDropLabels,
                               String alertQueryUrl,
                               String alertRelabelConfigFile,
                               io.fabric8.kubernetes.api.model.SecretKeySelector alertRelabelConfigs,
                               io.fabric8.kubernetes.api.model.SecretKeySelector alertmanagersConfig,
                               List<String> alertmanagersUrl,
                               List<io.fabric8.kubernetes.api.model.Container> containers,
                               PodDNSConfig dnsConfig,
                               String dnsPolicy,
                               List<String> enableFeatures,
                               Boolean enableServiceLinks,
                               String enforcedNamespaceLabel,
                               String evaluationInterval,
                               List<ObjectReference> excludedFromEnforcement,
                               String externalPrefix,
                               TLSConfig grpcServerTlsConfig,
                               List<HostAlias> hostAliases,
                               Boolean hostUsers,
                               String image,
                               String imagePullPolicy,
                               List<io.fabric8.kubernetes.api.model.LocalObjectReference> imagePullSecrets,
                               List<io.fabric8.kubernetes.api.model.Container> initContainers,
                               Map<String,​String> labels,
                               Boolean listenLocal,
                               String logFormat,
                               String logLevel,
                               Integer minReadySeconds,
                               Map<String,​String> nodeSelector,
                               io.fabric8.kubernetes.api.model.SecretKeySelector objectStorageConfig,
                               String objectStorageConfigFile,
                               Boolean paused,
                               EmbeddedObjectMetadata podMetadata,
                               String portName,
                               String priorityClassName,
                               List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce,
                               io.fabric8.kubernetes.api.model.SecretKeySelector queryConfig,
                               List<String> queryEndpoints,
                               List<RemoteWriteSpec> remoteWrite,
                               Integer replicas,
                               String resendDelay,
                               io.fabric8.kubernetes.api.model.ResourceRequirements resources,
                               String retention,
                               String routePrefix,
                               Integer ruleConcurrentEval,
                               String ruleGracePeriod,
                               io.fabric8.kubernetes.api.model.LabelSelector ruleNamespaceSelector,
                               String ruleOutageTolerance,
                               String ruleQueryOffset,
                               io.fabric8.kubernetes.api.model.LabelSelector ruleSelector,
                               io.fabric8.kubernetes.api.model.PodSecurityContext securityContext,
                               String serviceAccountName,
                               String serviceName,
                               StorageSpec storage,
                               Long terminationGracePeriodSeconds,
                               List<io.fabric8.kubernetes.api.model.Toleration> tolerations,
                               List<io.fabric8.kubernetes.api.model.TopologySpreadConstraint> topologySpreadConstraints,
                               io.fabric8.kubernetes.api.model.SecretKeySelector tracingConfig,
                               String tracingConfigFile,
                               String version,
                               List<io.fabric8.kubernetes.api.model.VolumeMount> volumeMounts,
                               List<io.fabric8.kubernetes.api.model.Volume> volumes,
                               ThanosRulerWebSpec web)
    • Method Detail

      • getAdditionalArgs

        public List<Argument> getAdditionalArgs()
        AdditionalArgs allows setting additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler 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 ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler 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.
      • getAffinity

        public io.fabric8.kubernetes.api.model.Affinity getAffinity()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setAffinity

        public void setAffinity​(io.fabric8.kubernetes.api.model.Affinity affinity)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getAlertDropLabels

        public List<String> getAlertDropLabels()
        Configures the label names which should be dropped in Thanos Ruler alerts.


        The replica label `thanos_ruler_replica` will always be dropped from the alerts.

      • setAlertDropLabels

        public void setAlertDropLabels​(List<String> alertDropLabels)
        Configures the label names which should be dropped in Thanos Ruler alerts.


        The replica label `thanos_ruler_replica` will always be dropped from the alerts.

      • getAlertQueryUrl

        public String getAlertQueryUrl()
        The external Query URL the Thanos Ruler will set in the 'Source' field of all alerts. Maps to the '--alert.query-url' CLI arg.
      • setAlertQueryUrl

        public void setAlertQueryUrl​(String alertQueryUrl)
        The external Query URL the Thanos Ruler will set in the 'Source' field of all alerts. Maps to the '--alert.query-url' CLI arg.
      • getAlertRelabelConfigFile

        public String getAlertRelabelConfigFile()
        Configures the path to the alert relabeling configuration file.


        Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs


        The operator performs no validation of the configuration file.


        This field takes precedence over `alertRelabelConfig`.

      • setAlertRelabelConfigFile

        public void setAlertRelabelConfigFile​(String alertRelabelConfigFile)
        Configures the path to the alert relabeling configuration file.


        Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs


        The operator performs no validation of the configuration file.


        This field takes precedence over `alertRelabelConfig`.

      • getAlertRelabelConfigs

        public io.fabric8.kubernetes.api.model.SecretKeySelector getAlertRelabelConfigs()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setAlertRelabelConfigs

        public void setAlertRelabelConfigs​(io.fabric8.kubernetes.api.model.SecretKeySelector alertRelabelConfigs)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getAlertmanagersConfig

        public io.fabric8.kubernetes.api.model.SecretKeySelector getAlertmanagersConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setAlertmanagersConfig

        public void setAlertmanagersConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector alertmanagersConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getAlertmanagersUrl

        public List<String> getAlertmanagersUrl()
        Configures the list of Alertmanager endpoints to send alerts to.


        For Thanos >= v0.10.0, it is recommended to use `alertmanagersConfig` instead.


        `alertmanagersConfig` takes precedence over this field.

      • setAlertmanagersUrl

        public void setAlertmanagersUrl​(List<String> alertmanagersUrl)
        Configures the list of Alertmanager endpoints to send alerts to.


        For Thanos >= v0.10.0, it is recommended to use `alertmanagersConfig` instead.


        `alertmanagersConfig` takes precedence over this field.

      • getContainers

        public List<io.fabric8.kubernetes.api.model.Container> getContainers()
        Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a ThanosRuler pod or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: `thanos-ruler` and `config-reloader`. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
      • setContainers

        public void setContainers​(List<io.fabric8.kubernetes.api.model.Container> containers)
        Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a ThanosRuler pod or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: `thanos-ruler` and `config-reloader`. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
      • getDnsConfig

        public PodDNSConfig getDnsConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setDnsConfig

        public void setDnsConfig​(PodDNSConfig dnsConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getDnsPolicy

        public String getDnsPolicy()
        Defines the DNS policy for the pods.
      • setDnsPolicy

        public void setDnsPolicy​(String dnsPolicy)
        Defines the DNS policy for the pods.
      • getEnableFeatures

        public List<String> getEnableFeatures()
        Enable access to Thanos Ruler feature flags. By default, no features are enabled.


        Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.


        For more information see https://thanos.io/tip/components/rule.md/


        It requires Thanos >= 0.39.0.

      • setEnableFeatures

        public void setEnableFeatures​(List<String> enableFeatures)
        Enable access to Thanos Ruler feature flags. By default, no features are enabled.


        Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.


        For more information see https://thanos.io/tip/components/rule.md/


        It requires Thanos >= 0.39.0.

      • getEnableServiceLinks

        public Boolean getEnableServiceLinks()
        Indicates whether information about services should be injected into pod's environment variables
      • setEnableServiceLinks

        public void setEnableServiceLinks​(Boolean enableServiceLinks)
        Indicates whether information about services should be injected into pod's environment variables
      • getEnforcedNamespaceLabel

        public String getEnforcedNamespaceLabel()
        EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.
      • setEnforcedNamespaceLabel

        public void setEnforcedNamespaceLabel​(String enforcedNamespaceLabel)
        EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.
      • getEvaluationInterval

        public String getEvaluationInterval()
        Interval between consecutive evaluations.
      • setEvaluationInterval

        public void setEvaluationInterval​(String evaluationInterval)
        Interval between consecutive evaluations.
      • getExcludedFromEnforcement

        public List<ObjectReference> getExcludedFromEnforcement()
        List of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true.
      • setExcludedFromEnforcement

        public void setExcludedFromEnforcement​(List<ObjectReference> excludedFromEnforcement)
        List of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true.
      • getExternalPrefix

        public String getExternalPrefix()
        The external URL the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name.
      • setExternalPrefix

        public void setExternalPrefix​(String externalPrefix)
        The external URL the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name.
      • getGrpcServerTlsConfig

        public TLSConfig getGrpcServerTlsConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setGrpcServerTlsConfig

        public void setGrpcServerTlsConfig​(TLSConfig grpcServerTlsConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getHostAliases

        public List<HostAlias> getHostAliases()
        Pods' hostAliases configuration
      • setHostAliases

        public void setHostAliases​(List<HostAlias> hostAliases)
        Pods' hostAliases configuration
      • getHostUsers

        public Boolean getHostUsers()
        HostUsers supports the user space in Kubernetes.


        More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/


        The feature requires at least Kubernetes 1.28 with the `UserNamespacesSupport` feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

      • setHostUsers

        public void setHostUsers​(Boolean hostUsers)
        HostUsers supports the user space in Kubernetes.


        More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/


        The feature requires at least Kubernetes 1.28 with the `UserNamespacesSupport` feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

      • getImage

        public String getImage()
        Thanos container image URL.
      • setImage

        public void setImage​(String image)
        Thanos container image URL.
      • getImagePullPolicy

        public String getImagePullPolicy()
        Image pull policy for the 'thanos', 'init-config-reloader' and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.


        Possible enum values:

        - `"Always"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.

        - `"IfNotPresent"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.

        - `"Never"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present

      • setImagePullPolicy

        public void setImagePullPolicy​(String imagePullPolicy)
        Image pull policy for the 'thanos', 'init-config-reloader' and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.


        Possible enum values:

        - `"Always"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.

        - `"IfNotPresent"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.

        - `"Never"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present

      • getImagePullSecrets

        public List<io.fabric8.kubernetes.api.model.LocalObjectReference> getImagePullSecrets()
        An optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
      • setImagePullSecrets

        public void setImagePullSecrets​(List<io.fabric8.kubernetes.api.model.LocalObjectReference> imagePullSecrets)
        An optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
      • getInitContainers

        public List<io.fabric8.kubernetes.api.model.Container> getInitContainers()
        InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the ThanosRuler configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
      • setInitContainers

        public void setInitContainers​(List<io.fabric8.kubernetes.api.model.Container> initContainers)
        InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the ThanosRuler configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.
      • getLabels

        public Map<String,​String> getLabels()
        Configures the external label pairs of the ThanosRuler resource.


        A default replica label `thanos_ruler_replica` will be always added as a label with the value of the pod's name.

      • setLabels

        public void setLabels​(Map<String,​String> labels)
        Configures the external label pairs of the ThanosRuler resource.


        A default replica label `thanos_ruler_replica` will be always added as a label with the value of the pod's name.

      • getListenLocal

        public Boolean getListenLocal()
        ListenLocal makes the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.
      • setListenLocal

        public void setListenLocal​(Boolean listenLocal)
        ListenLocal makes the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.
      • getLogFormat

        public String getLogFormat()
        Log format for ThanosRuler to be configured with.
      • setLogFormat

        public void setLogFormat​(String logFormat)
        Log format for ThanosRuler to be configured with.
      • getLogLevel

        public String getLogLevel()
        Log level for ThanosRuler to be configured with.
      • setLogLevel

        public void setLogLevel​(String logLevel)
        Log level for ThanosRuler to be configured with.
      • getMinReadySeconds

        public Integer getMinReadySeconds()
        Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.


        If unset, pods will be considered available as soon as they are ready.

      • setMinReadySeconds

        public void setMinReadySeconds​(Integer minReadySeconds)
        Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.


        If unset, pods will be considered available as soon as they are ready.

      • getNodeSelector

        public Map<String,​String> getNodeSelector()
        Define which Nodes the Pods are scheduled on.
      • setNodeSelector

        public void setNodeSelector​(Map<String,​String> nodeSelector)
        Define which Nodes the Pods are scheduled on.
      • getObjectStorageConfig

        public io.fabric8.kubernetes.api.model.SecretKeySelector getObjectStorageConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setObjectStorageConfig

        public void setObjectStorageConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector objectStorageConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getObjectStorageConfigFile

        public String getObjectStorageConfigFile()
        Configures the path of the object storage configuration file.


        The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage


        The operator performs no validation of the configuration file.


        This field takes precedence over `objectStorageConfig`.

      • setObjectStorageConfigFile

        public void setObjectStorageConfigFile​(String objectStorageConfigFile)
        Configures the path of the object storage configuration file.


        The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage


        The operator performs no validation of the configuration file.


        This field takes precedence over `objectStorageConfig`.

      • getPaused

        public Boolean getPaused()
        When a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.
      • setPaused

        public void setPaused​(Boolean paused)
        When a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.
      • getPodMetadata

        public EmbeddedObjectMetadata getPodMetadata()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setPodMetadata

        public void setPodMetadata​(EmbeddedObjectMetadata podMetadata)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getPortName

        public String getPortName()
        Port name used for the pods and governing service. Defaults to `web`.
      • setPortName

        public void setPortName​(String portName)
        Port name used for the pods and governing service. Defaults to `web`.
      • getPriorityClassName

        public String getPriorityClassName()
        Priority class assigned to the Pods
      • setPriorityClassName

        public void setPriorityClassName​(String priorityClassName)
        Priority class assigned to the Pods
      • getPrometheusRulesExcludedFromEnforce

        public List<PrometheusRuleExcludeConfig> getPrometheusRulesExcludedFromEnforce()
        PrometheusRulesExcludedFromEnforce - list of Prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair Deprecated: use excludedFromEnforcement instead.
      • setPrometheusRulesExcludedFromEnforce

        public void setPrometheusRulesExcludedFromEnforce​(List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce)
        PrometheusRulesExcludedFromEnforce - list of Prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair Deprecated: use excludedFromEnforcement instead.
      • getQueryConfig

        public io.fabric8.kubernetes.api.model.SecretKeySelector getQueryConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setQueryConfig

        public void setQueryConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector queryConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getQueryEndpoints

        public List<String> getQueryEndpoints()
        Configures the list of Thanos Query endpoints from which to query metrics.


        For Thanos >= v0.11.0, it is recommended to use `queryConfig` instead.


        `queryConfig` takes precedence over this field.

      • setQueryEndpoints

        public void setQueryEndpoints​(List<String> queryEndpoints)
        Configures the list of Thanos Query endpoints from which to query metrics.


        For Thanos >= v0.11.0, it is recommended to use `queryConfig` instead.


        `queryConfig` takes precedence over this field.

      • getRemoteWrite

        public List<RemoteWriteSpec> getRemoteWrite()
        Defines the list of remote write configurations.


        When the list isn't empty, the ruler is configured with stateless mode.


        It requires Thanos >= 0.24.0.

      • setRemoteWrite

        public void setRemoteWrite​(List<RemoteWriteSpec> remoteWrite)
        Defines the list of remote write configurations.


        When the list isn't empty, the ruler is configured with stateless mode.


        It requires Thanos >= 0.24.0.

      • getReplicas

        public Integer getReplicas()
        Number of thanos ruler instances to deploy.
      • setReplicas

        public void setReplicas​(Integer replicas)
        Number of thanos ruler instances to deploy.
      • getResendDelay

        public String getResendDelay()
        Minimum amount of time to wait before resending an alert to Alertmanager.
      • setResendDelay

        public void setResendDelay​(String resendDelay)
        Minimum amount of time to wait before resending an alert to Alertmanager.
      • getResources

        public io.fabric8.kubernetes.api.model.ResourceRequirements getResources()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setResources

        public void setResources​(io.fabric8.kubernetes.api.model.ResourceRequirements resources)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getRetention

        public String getRetention()
        Time duration ThanosRuler shall retain data for. Default is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years).


        The field has no effect when remote-write is configured since the Ruler operates in stateless mode.

      • setRetention

        public void setRetention​(String retention)
        Time duration ThanosRuler shall retain data for. Default is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years).


        The field has no effect when remote-write is configured since the Ruler operates in stateless mode.

      • getRoutePrefix

        public String getRoutePrefix()
        The route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path.
      • setRoutePrefix

        public void setRoutePrefix​(String routePrefix)
        The route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path.
      • getRuleConcurrentEval

        public Integer getRuleConcurrentEval()
        How many rules can be evaluated concurrently. It requires Thanos >= v0.37.0.
      • setRuleConcurrentEval

        public void setRuleConcurrentEval​(Integer ruleConcurrentEval)
        How many rules can be evaluated concurrently. It requires Thanos >= v0.37.0.
      • getRuleGracePeriod

        public String getRuleGracePeriod()
        Minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period. It requires Thanos >= v0.30.0.
      • setRuleGracePeriod

        public void setRuleGracePeriod​(String ruleGracePeriod)
        Minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period. It requires Thanos >= v0.30.0.
      • getRuleNamespaceSelector

        public io.fabric8.kubernetes.api.model.LabelSelector getRuleNamespaceSelector()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setRuleNamespaceSelector

        public void setRuleNamespaceSelector​(io.fabric8.kubernetes.api.model.LabelSelector ruleNamespaceSelector)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getRuleOutageTolerance

        public String getRuleOutageTolerance()
        Max time to tolerate prometheus outage for restoring "for" state of alert. It requires Thanos >= v0.30.0.
      • setRuleOutageTolerance

        public void setRuleOutageTolerance​(String ruleOutageTolerance)
        Max time to tolerate prometheus outage for restoring "for" state of alert. It requires Thanos >= v0.30.0.
      • getRuleQueryOffset

        public String getRuleQueryOffset()
        The default rule group's query offset duration to use. It requires Thanos >= v0.38.0.
      • setRuleQueryOffset

        public void setRuleQueryOffset​(String ruleQueryOffset)
        The default rule group's query offset duration to use. It requires Thanos >= v0.38.0.
      • getRuleSelector

        public io.fabric8.kubernetes.api.model.LabelSelector getRuleSelector()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setRuleSelector

        public void setRuleSelector​(io.fabric8.kubernetes.api.model.LabelSelector ruleSelector)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getSecurityContext

        public io.fabric8.kubernetes.api.model.PodSecurityContext getSecurityContext()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setSecurityContext

        public void setSecurityContext​(io.fabric8.kubernetes.api.model.PodSecurityContext securityContext)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getServiceAccountName

        public String getServiceAccountName()
        ServiceAccountName is the name of the ServiceAccount to use to run the Thanos Ruler Pods.
      • setServiceAccountName

        public void setServiceAccountName​(String serviceAccountName)
        ServiceAccountName is the name of the ServiceAccount to use to run the Thanos Ruler Pods.
      • getServiceName

        public String getServiceName()
        The name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named `thanos-ruler-operated` for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.
      • setServiceName

        public void setServiceName​(String serviceName)
        The name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named `thanos-ruler-operated` for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.
      • getStorage

        public StorageSpec getStorage()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setStorage

        public void setStorage​(StorageSpec storage)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getTerminationGracePeriodSeconds

        public Long getTerminationGracePeriodSeconds()
        Optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.


        Defaults to 120 seconds.

      • setTerminationGracePeriodSeconds

        public void setTerminationGracePeriodSeconds​(Long terminationGracePeriodSeconds)
        Optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.


        Defaults to 120 seconds.

      • getTolerations

        public List<io.fabric8.kubernetes.api.model.Toleration> getTolerations()
        If specified, the pod's tolerations.
      • setTolerations

        public void setTolerations​(List<io.fabric8.kubernetes.api.model.Toleration> tolerations)
        If specified, the pod's tolerations.
      • getTopologySpreadConstraints

        public List<io.fabric8.kubernetes.api.model.TopologySpreadConstraint> getTopologySpreadConstraints()
        If specified, the pod's topology spread constraints.
      • setTopologySpreadConstraints

        public void setTopologySpreadConstraints​(List<io.fabric8.kubernetes.api.model.TopologySpreadConstraint> topologySpreadConstraints)
        If specified, the pod's topology spread constraints.
      • getTracingConfig

        public io.fabric8.kubernetes.api.model.SecretKeySelector getTracingConfig()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setTracingConfig

        public void setTracingConfig​(io.fabric8.kubernetes.api.model.SecretKeySelector tracingConfig)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getTracingConfigFile

        public String getTracingConfigFile()
        Configures the path of the tracing configuration file.


        The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration


        This is an *experimental feature*, it may change in any upcoming release in a breaking way.


        The operator performs no validation of the configuration file.


        This field takes precedence over `tracingConfig`.

      • setTracingConfigFile

        public void setTracingConfigFile​(String tracingConfigFile)
        Configures the path of the tracing configuration file.


        The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration


        This is an *experimental feature*, it may change in any upcoming release in a breaking way.


        The operator performs no validation of the configuration file.


        This field takes precedence over `tracingConfig`.

      • getVersion

        public String getVersion()
        Version of Thanos to be deployed.
      • setVersion

        public void setVersion​(String version)
        Version of Thanos to be deployed.
      • getVolumeMounts

        public List<io.fabric8.kubernetes.api.model.VolumeMount> getVolumeMounts()
        VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects.
      • setVolumeMounts

        public void setVolumeMounts​(List<io.fabric8.kubernetes.api.model.VolumeMount> volumeMounts)
        VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects.
      • getVolumes

        public List<io.fabric8.kubernetes.api.model.Volume> getVolumes()
        Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.
      • setVolumes

        public void setVolumes​(List<io.fabric8.kubernetes.api.model.Volume> volumes)
        Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.
      • getWeb

        public ThanosRulerWebSpec getWeb()
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • setWeb

        public void setWeb​(ThanosRulerWebSpec web)
        ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
      • getAdditionalProperties

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

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

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