Class PrometheusSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1.PrometheusSpec
-
- All Implemented Interfaces:
Editable<PrometheusSpecBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class PrometheusSpec extends Object implements Editable<PrometheusSpecBuilder>, KubernetesResource
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrometheusSpec()No args constructor for use in serializationPrometheusSpec(SecretKeySelector additionalAlertManagerConfigs, SecretKeySelector additionalAlertRelabelConfigs, List<Argument> additionalArgs, SecretKeySelector additionalScrapeConfigs, Affinity affinity, AlertingSpec alerting, Boolean allowOverlappingBlocks, APIServerConfig apiserverConfig, ArbitraryFSAccessThroughSMsConfig arbitraryFSAccessThroughSMs, Boolean automountServiceAccountToken, String baseImage, String bodySizeLimit, List<String> configMaps, List<Container> containers, Boolean convertClassicHistogramsToNHCB, Boolean disableCompaction, PodDNSConfig dnsConfig, String dnsPolicy, Boolean enableAdminAPI, List<String> enableFeatures, Boolean enableOTLPReceiver, Boolean enableRemoteWriteReceiver, Boolean enableServiceLinks, String enforcedBodySizeLimit, Long enforcedKeepDroppedTargets, Long enforcedLabelLimit, Long enforcedLabelNameLengthLimit, Long enforcedLabelValueLengthLimit, String enforcedNamespaceLabel, Long enforcedSampleLimit, Long enforcedTargetLimit, String evaluationInterval, List<ObjectReference> excludedFromEnforcement, Exemplars exemplars, Map<String,String> externalLabels, String externalUrl, List<HostAlias> hostAliases, Boolean hostNetwork, Boolean hostUsers, Boolean ignoreNamespaceSelectors, String image, String imagePullPolicy, List<LocalObjectReference> imagePullSecrets, List<Container> initContainers, Long keepDroppedTargets, Long labelLimit, Long labelNameLengthLimit, Long labelValueLengthLimit, Boolean listenLocal, String logFormat, String logLevel, Integer maximumStartupDurationSeconds, Integer minReadySeconds, String nameEscapingScheme, String nameValidationScheme, Map<String,String> nodeSelector, OTLPConfig otlp, Boolean overrideHonorLabels, Boolean overrideHonorTimestamps, Boolean paused, io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy, String podManagementPolicy, EmbeddedObjectMetadata podMetadata, LabelSelector podMonitorNamespaceSelector, LabelSelector podMonitorSelector, List<String> podTargetLabels, String portName, String priorityClassName, LabelSelector probeNamespaceSelector, LabelSelector probeSelector, String prometheusExternalLabelName, List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce, QuerySpec query, String queryLogFile, String reloadStrategy, List<RemoteReadSpec> remoteRead, List<RemoteWriteSpec> remoteWrite, List<String> remoteWriteReceiverMessageVersions, String replicaExternalLabelName, Integer replicas, ResourceRequirements resources, String retention, String retentionSize, String routePrefix, LabelSelector ruleNamespaceSelector, String ruleQueryOffset, LabelSelector ruleSelector, Rules rules, RuntimeConfig runtime, Long sampleLimit, String schedulerName, List<ScrapeClass> scrapeClasses, Boolean scrapeClassicHistograms, LabelSelector scrapeConfigNamespaceSelector, LabelSelector scrapeConfigSelector, String scrapeFailureLogFile, String scrapeInterval, Boolean scrapeNativeHistograms, List<String> scrapeProtocols, String scrapeTimeout, List<String> secrets, PodSecurityContext securityContext, String serviceAccountName, String serviceDiscoveryRole, LabelSelector serviceMonitorNamespaceSelector, LabelSelector serviceMonitorSelector, String serviceName, String sha, ShardRetentionPolicy shardRetentionPolicy, ShardingStrategy shardingStrategy, Integer shards, StorageSpec storage, String tag, Long targetLimit, Long terminationGracePeriodSeconds, ThanosSpec thanos, List<Toleration> tolerations, List<TopologySpreadConstraint> topologySpreadConstraints, TracingConfig tracingConfig, TSDBSpec tsdb, StatefulSetUpdateStrategy updateStrategy, String version, List<VolumeMount> volumeMounts, List<Volume> volumes, Boolean walCompression, PrometheusWebSpec web)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrometheusSpecBuilderedit()SecretKeySelectorgetAdditionalAlertManagerConfigs()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.SecretKeySelectorgetAdditionalAlertRelabelConfigs()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.List<Argument>getAdditionalArgs()additionalArgs allows setting additional arguments for the 'prometheus' container.Map<String,Object>getAdditionalProperties()SecretKeySelectorgetAdditionalScrapeConfigs()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.AffinitygetAffinity()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.AlertingSpecgetAlerting()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.BooleangetAllowOverlappingBlocks()allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.APIServerConfiggetApiserverConfig()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.ArbitraryFSAccessThroughSMsConfiggetArbitraryFSAccessThroughSMs()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.BooleangetAutomountServiceAccountToken()automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod.StringgetBaseImage()baseImage is deprecated: use 'spec.image' instead.StringgetBodySizeLimit()bodySizeLimit defines per-scrape on response body size.List<String>getConfigMaps()configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods.List<Container>getContainers()containers allows injecting additional containers or modifying operator generated containers.BooleangetConvertClassicHistogramsToNHCB()convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.BooleangetDisableCompaction()disableCompaction when true, the Prometheus compaction is disabled.PodDNSConfiggetDnsConfig()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetDnsPolicy()dnsPolicy defines the DNS policy for the pods.BooleangetEnableAdminAPI()enableAdminAPI defines access to the Prometheus web admin API.List<String>getEnableFeatures()enableFeatures enables access to Prometheus feature flags.BooleangetEnableOTLPReceiver()enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.BooleangetEnableRemoteWriteReceiver()enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.BooleangetEnableServiceLinks()enableServiceLinks defines whether information about services should be injected into pod's environment variablesStringgetEnforcedBodySizeLimit()enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus.LonggetEnforcedKeepDroppedTargets()enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory.LonggetEnforcedLabelLimit()enforcedLabelLimit when defined specifies a global limit on the number of labels per sample.LonggetEnforcedLabelNameLengthLimit()enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample.LonggetEnforcedLabelValueLengthLimit()enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample.StringgetEnforcedNamespaceLabel()enforcedNamespaceLabel when not empty, a label will be added to:LonggetEnforcedSampleLimit()enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted.LonggetEnforcedTargetLimit()enforcedTargetLimit when defined specifies a global limit on the number of scraped targets.StringgetEvaluationInterval()evaluationInterval defines the interval between rule evaluations.List<ObjectReference>getExcludedFromEnforcement()excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.ExemplarsgetExemplars()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.Map<String,String>getExternalLabels()externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).StringgetExternalUrl()externalUrl defines the external URL under which the Prometheus service is externally available.List<HostAlias>getHostAliases()hostAliases defines the optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.BooleangetHostNetwork()hostNetwork defines the host's network namespace if true.BooleangetHostUsers()hostUsers supports the user space in Kubernetes.BooleangetIgnoreNamespaceSelectors()ignoreNamespaceSelectors when true, `spec.namespaceSelector` from all PodMonitor, ServiceMonitor and Probe objects will be ignored.StringgetImage()image defines the container image name for Prometheus.StringgetImagePullPolicy()imagePullPolicy defines the image pull policy for the 'prometheus', 'init-config-reloader' and 'config-reloader' containers.List<LocalObjectReference>getImagePullSecrets()imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries.List<Container>getInitContainers()initContainers allows injecting initContainers to the Pod definition.LonggetKeepDroppedTargets()keepDroppedTargets defines the per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.LonggetLabelLimit()labelLimit defines per-scrape limit on number of labels that will be accepted for a sample.LonggetLabelNameLengthLimit()labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.LonggetLabelValueLengthLimit()labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.BooleangetListenLocal()listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP's address.StringgetLogFormat()logFormat for Log level for Prometheus and the config-reloader sidecar.StringgetLogLevel()logLevel for Prometheus and the config-reloader sidecar.IntegergetMaximumStartupDurationSeconds()maximumStartupDurationSeconds defines the maximum time that the `prometheus` container's startup probe will wait before being considered failed.IntegergetMinReadySeconds()minReadySeconds defines the 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.StringgetNameEscapingScheme()nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.StringgetNameValidationScheme()nameValidationScheme defines the validation scheme for metric and label names.Map<String,String>getNodeSelector()nodeSelector defines on which Nodes the Pods are scheduled.OTLPConfiggetOtlp()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.BooleangetOverrideHonorLabels()overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped dataBooleangetOverrideHonorTimestamps()overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors.BooleangetPaused()paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicygetPersistentVolumeClaimRetentionPolicy()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetPodManagementPolicy()podManagementPolicy defines the policy for creating/deleting pods when scaling up and down.EmbeddedObjectMetadatagetPodMetadata()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetPodMonitorNamespaceSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetPodMonitorSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.List<String>getPodTargetLabels()podTargetLabels are appended to the `spec.podTargetLabels` field of all PodMonitor and ServiceMonitor objects.StringgetPortName()portName used for the pods and governing service.StringgetPriorityClassName()priorityClassName assigned to the Pods.LabelSelectorgetProbeNamespaceSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetProbeSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetPrometheusExternalLabelName()prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name.List<PrometheusRuleExcludeConfig>getPrometheusRulesExcludedFromEnforce()prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn't apply.QuerySpecgetQuery()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetQueryLogFile()queryLogFile specifies where the file to which PromQL queries are logged.StringgetReloadStrategy()reloadStrategy defines the strategy used to reload the Prometheus configuration.List<RemoteReadSpec>getRemoteRead()remoteRead defines the list of remote read configurations.List<RemoteWriteSpec>getRemoteWrite()remoteWrite defines the list of remote write configurations.List<String>getRemoteWriteReceiverMessageVersions()remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.StringgetReplicaExternalLabelName()replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name.IntegergetReplicas()replicas defines the number of replicas of each shard to deploy for a Prometheus deployment.ResourceRequirementsgetResources()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetRetention()retention defines how long to retain the Prometheus data.StringgetRetentionSize()retentionSize defines the maximum number of bytes used by the Prometheus data.StringgetRoutePrefix()routePrefix defines the route prefix Prometheus registers HTTP handlers for.LabelSelectorgetRuleNamespaceSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetRuleQueryOffset()ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.RulesgetRules()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetRuleSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.RuntimeConfiggetRuntime()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LonggetSampleLimit()sampleLimit defines per-scrape limit on number of scraped samples that will be accepted.StringgetSchedulerName()schedulerName defines the scheduler to use for Pod scheduling.List<ScrapeClass>getScrapeClasses()scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.BooleangetScrapeClassicHistograms()scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.LabelSelectorgetScrapeConfigNamespaceSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetScrapeConfigSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetScrapeFailureLogFile()scrapeFailureLogFile defines the file to which scrape failures are logged.StringgetScrapeInterval()scrapeInterval defines interval between consecutive scrapes.BooleangetScrapeNativeHistograms()scrapeNativeHistograms defines whether to enable scraping of native histograms.List<String>getScrapeProtocols()scrapeProtocols defines the protocols to negotiate during a scrape.StringgetScrapeTimeout()scrapeTimeout defines the number of seconds to wait until a scrape request times out.List<String>getSecrets()secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods.PodSecurityContextgetSecurityContext()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetServiceAccountName()serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.StringgetServiceDiscoveryRole()serviceDiscoveryRole defines the service discovery role used to discover targets from `ServiceMonitor` objects and Alertmanager endpoints.LabelSelectorgetServiceMonitorNamespaceSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.LabelSelectorgetServiceMonitorSelector()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetServiceName()serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service.StringgetSha()sha is deprecated: use 'spec.image' instead.ShardingStrategygetShardingStrategy()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.ShardRetentionPolicygetShardRetentionPolicy()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.IntegergetShards()shards defines the number of shards to distribute the scraped targets onto.StorageSpecgetStorage()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetTag()tag is deprecated: use 'spec.image' instead.LonggetTargetLimit()targetLimit defines a limit on the number of scraped targets that will be accepted.LonggetTerminationGracePeriodSeconds()terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully.ThanosSpecgetThanos()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.List<Toleration>getTolerations()tolerations defines the Pods' tolerations if specified.List<TopologySpreadConstraint>getTopologySpreadConstraints()topologySpreadConstraints defines the pod's topology spread constraints if specified.TracingConfiggetTracingConfig()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.TSDBSpecgetTsdb()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StatefulSetUpdateStrategygetUpdateStrategy()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.StringgetVersion()version of Prometheus being deployed.List<VolumeMount>getVolumeMounts()volumeMounts allows the configuration of additional VolumeMounts.List<Volume>getVolumes()volumes allows the configuration of additional volumes on the output StatefulSet definition.BooleangetWalCompression()walCompression defines the compression of the write-ahead log (WAL) using Snappy.PrometheusWebSpecgetWeb()PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAdditionalAlertManagerConfigs(SecretKeySelector additionalAlertManagerConfigs)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAdditionalAlertRelabelConfigs(SecretKeySelector additionalAlertRelabelConfigs)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAdditionalArgs(List<Argument> additionalArgs)additionalArgs allows setting additional arguments for the 'prometheus' container.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetAdditionalScrapeConfigs(SecretKeySelector additionalScrapeConfigs)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAffinity(Affinity affinity)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAlerting(AlertingSpec alerting)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAllowOverlappingBlocks(Boolean allowOverlappingBlocks)allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.voidsetApiserverConfig(APIServerConfig apiserverConfig)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetArbitraryFSAccessThroughSMs(ArbitraryFSAccessThroughSMsConfig arbitraryFSAccessThroughSMs)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetAutomountServiceAccountToken(Boolean automountServiceAccountToken)automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod.voidsetBaseImage(String baseImage)baseImage is deprecated: use 'spec.image' instead.voidsetBodySizeLimit(String bodySizeLimit)bodySizeLimit defines per-scrape on response body size.voidsetConfigMaps(List<String> configMaps)configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods.voidsetContainers(List<Container> containers)containers allows injecting additional containers or modifying operator generated containers.voidsetConvertClassicHistogramsToNHCB(Boolean convertClassicHistogramsToNHCB)convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.voidsetDisableCompaction(Boolean disableCompaction)disableCompaction when true, the Prometheus compaction is disabled.voidsetDnsConfig(PodDNSConfig dnsConfig)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetDnsPolicy(String dnsPolicy)dnsPolicy defines the DNS policy for the pods.voidsetEnableAdminAPI(Boolean enableAdminAPI)enableAdminAPI defines access to the Prometheus web admin API.voidsetEnableFeatures(List<String> enableFeatures)enableFeatures enables access to Prometheus feature flags.voidsetEnableOTLPReceiver(Boolean enableOTLPReceiver)enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.voidsetEnableRemoteWriteReceiver(Boolean enableRemoteWriteReceiver)enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.voidsetEnableServiceLinks(Boolean enableServiceLinks)enableServiceLinks defines whether information about services should be injected into pod's environment variablesvoidsetEnforcedBodySizeLimit(String enforcedBodySizeLimit)enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus.voidsetEnforcedKeepDroppedTargets(Long enforcedKeepDroppedTargets)enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory.voidsetEnforcedLabelLimit(Long enforcedLabelLimit)enforcedLabelLimit when defined specifies a global limit on the number of labels per sample.voidsetEnforcedLabelNameLengthLimit(Long enforcedLabelNameLengthLimit)enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample.voidsetEnforcedLabelValueLengthLimit(Long enforcedLabelValueLengthLimit)enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample.voidsetEnforcedNamespaceLabel(String enforcedNamespaceLabel)enforcedNamespaceLabel when not empty, a label will be added to:voidsetEnforcedSampleLimit(Long enforcedSampleLimit)enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted.voidsetEnforcedTargetLimit(Long enforcedTargetLimit)enforcedTargetLimit when defined specifies a global limit on the number of scraped targets.voidsetEvaluationInterval(String evaluationInterval)evaluationInterval defines the interval between rule evaluations.voidsetExcludedFromEnforcement(List<ObjectReference> excludedFromEnforcement)excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.voidsetExemplars(Exemplars exemplars)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetExternalLabels(Map<String,String> externalLabels)externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).voidsetExternalUrl(String externalUrl)externalUrl defines the external URL under which the Prometheus service is externally available.voidsetHostAliases(List<HostAlias> hostAliases)hostAliases defines the optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.voidsetHostNetwork(Boolean hostNetwork)hostNetwork defines the host's network namespace if true.voidsetHostUsers(Boolean hostUsers)hostUsers supports the user space in Kubernetes.voidsetIgnoreNamespaceSelectors(Boolean ignoreNamespaceSelectors)ignoreNamespaceSelectors when true, `spec.namespaceSelector` from all PodMonitor, ServiceMonitor and Probe objects will be ignored.voidsetImage(String image)image defines the container image name for Prometheus.voidsetImagePullPolicy(String imagePullPolicy)imagePullPolicy defines the image pull policy for the 'prometheus', 'init-config-reloader' and 'config-reloader' containers.voidsetImagePullSecrets(List<LocalObjectReference> imagePullSecrets)imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries.voidsetInitContainers(List<Container> initContainers)initContainers allows injecting initContainers to the Pod definition.voidsetKeepDroppedTargets(Long keepDroppedTargets)keepDroppedTargets defines the per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.voidsetLabelLimit(Long labelLimit)labelLimit defines per-scrape limit on number of labels that will be accepted for a sample.voidsetLabelNameLengthLimit(Long labelNameLengthLimit)labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.voidsetLabelValueLengthLimit(Long labelValueLengthLimit)labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.voidsetListenLocal(Boolean listenLocal)listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP's address.voidsetLogFormat(String logFormat)logFormat for Log level for Prometheus and the config-reloader sidecar.voidsetLogLevel(String logLevel)logLevel for Prometheus and the config-reloader sidecar.voidsetMaximumStartupDurationSeconds(Integer maximumStartupDurationSeconds)maximumStartupDurationSeconds defines the maximum time that the `prometheus` container's startup probe will wait before being considered failed.voidsetMinReadySeconds(Integer minReadySeconds)minReadySeconds defines the 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.voidsetNameEscapingScheme(String nameEscapingScheme)nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.voidsetNameValidationScheme(String nameValidationScheme)nameValidationScheme defines the validation scheme for metric and label names.voidsetNodeSelector(Map<String,String> nodeSelector)nodeSelector defines on which Nodes the Pods are scheduled.voidsetOtlp(OTLPConfig otlp)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetOverrideHonorLabels(Boolean overrideHonorLabels)overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped datavoidsetOverrideHonorTimestamps(Boolean overrideHonorTimestamps)overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors.voidsetPaused(Boolean paused)paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.voidsetPersistentVolumeClaimRetentionPolicy(io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetPodManagementPolicy(String podManagementPolicy)podManagementPolicy defines the policy for creating/deleting pods when scaling up and down.voidsetPodMetadata(EmbeddedObjectMetadata podMetadata)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetPodMonitorNamespaceSelector(LabelSelector podMonitorNamespaceSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetPodMonitorSelector(LabelSelector podMonitorSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetPodTargetLabels(List<String> podTargetLabels)podTargetLabels are appended to the `spec.podTargetLabels` field of all PodMonitor and ServiceMonitor objects.voidsetPortName(String portName)portName used for the pods and governing service.voidsetPriorityClassName(String priorityClassName)priorityClassName assigned to the Pods.voidsetProbeNamespaceSelector(LabelSelector probeNamespaceSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetProbeSelector(LabelSelector probeSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetPrometheusExternalLabelName(String prometheusExternalLabelName)prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name.voidsetPrometheusRulesExcludedFromEnforce(List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce)prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn't apply.voidsetQuery(QuerySpec query)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetQueryLogFile(String queryLogFile)queryLogFile specifies where the file to which PromQL queries are logged.voidsetReloadStrategy(String reloadStrategy)reloadStrategy defines the strategy used to reload the Prometheus configuration.voidsetRemoteRead(List<RemoteReadSpec> remoteRead)remoteRead defines the list of remote read configurations.voidsetRemoteWrite(List<RemoteWriteSpec> remoteWrite)remoteWrite defines the list of remote write configurations.voidsetRemoteWriteReceiverMessageVersions(List<String> remoteWriteReceiverMessageVersions)remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.voidsetReplicaExternalLabelName(String replicaExternalLabelName)replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name.voidsetReplicas(Integer replicas)replicas defines the number of replicas of each shard to deploy for a Prometheus deployment.voidsetResources(ResourceRequirements resources)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetRetention(String retention)retention defines how long to retain the Prometheus data.voidsetRetentionSize(String retentionSize)retentionSize defines the maximum number of bytes used by the Prometheus data.voidsetRoutePrefix(String routePrefix)routePrefix defines the route prefix Prometheus registers HTTP handlers for.voidsetRuleNamespaceSelector(LabelSelector ruleNamespaceSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetRuleQueryOffset(String ruleQueryOffset)ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.voidsetRules(Rules rules)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetRuleSelector(LabelSelector ruleSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetRuntime(RuntimeConfig runtime)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetSampleLimit(Long sampleLimit)sampleLimit defines per-scrape limit on number of scraped samples that will be accepted.voidsetSchedulerName(String schedulerName)schedulerName defines the scheduler to use for Pod scheduling.voidsetScrapeClasses(List<ScrapeClass> scrapeClasses)scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.voidsetScrapeClassicHistograms(Boolean scrapeClassicHistograms)scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.voidsetScrapeConfigNamespaceSelector(LabelSelector scrapeConfigNamespaceSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetScrapeConfigSelector(LabelSelector scrapeConfigSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetScrapeFailureLogFile(String scrapeFailureLogFile)scrapeFailureLogFile defines the file to which scrape failures are logged.voidsetScrapeInterval(String scrapeInterval)scrapeInterval defines interval between consecutive scrapes.voidsetScrapeNativeHistograms(Boolean scrapeNativeHistograms)scrapeNativeHistograms defines whether to enable scraping of native histograms.voidsetScrapeProtocols(List<String> scrapeProtocols)scrapeProtocols defines the protocols to negotiate during a scrape.voidsetScrapeTimeout(String scrapeTimeout)scrapeTimeout defines the number of seconds to wait until a scrape request times out.voidsetSecrets(List<String> secrets)secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods.voidsetSecurityContext(PodSecurityContext securityContext)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetServiceAccountName(String serviceAccountName)serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.voidsetServiceDiscoveryRole(String serviceDiscoveryRole)serviceDiscoveryRole defines the service discovery role used to discover targets from `ServiceMonitor` objects and Alertmanager endpoints.voidsetServiceMonitorNamespaceSelector(LabelSelector serviceMonitorNamespaceSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetServiceMonitorSelector(LabelSelector serviceMonitorSelector)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetServiceName(String serviceName)serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service.voidsetSha(String sha)sha is deprecated: use 'spec.image' instead.voidsetShardingStrategy(ShardingStrategy shardingStrategy)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetShardRetentionPolicy(ShardRetentionPolicy shardRetentionPolicy)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetShards(Integer shards)shards defines the number of shards to distribute the scraped targets onto.voidsetStorage(StorageSpec storage)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetTag(String tag)tag is deprecated: use 'spec.image' instead.voidsetTargetLimit(Long targetLimit)targetLimit defines a limit on the number of scraped targets that will be accepted.voidsetTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds)terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully.voidsetThanos(ThanosSpec thanos)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetTolerations(List<Toleration> tolerations)tolerations defines the Pods' tolerations if specified.voidsetTopologySpreadConstraints(List<TopologySpreadConstraint> topologySpreadConstraints)topologySpreadConstraints defines the pod's topology spread constraints if specified.voidsetTracingConfig(TracingConfig tracingConfig)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetTsdb(TSDBSpec tsdb)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetUpdateStrategy(StatefulSetUpdateStrategy updateStrategy)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.voidsetVersion(String version)version of Prometheus being deployed.voidsetVolumeMounts(List<VolumeMount> volumeMounts)volumeMounts allows the configuration of additional VolumeMounts.voidsetVolumes(List<Volume> volumes)volumes allows the configuration of additional volumes on the output StatefulSet definition.voidsetWalCompression(Boolean walCompression)walCompression defines the compression of the write-ahead log (WAL) using Snappy.voidsetWeb(PrometheusWebSpec web)PrometheusSpec is a specification of the desired behavior of the Prometheus cluster.PrometheusSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
PrometheusSpec
public PrometheusSpec()
No args constructor for use in serialization
-
PrometheusSpec
public PrometheusSpec(SecretKeySelector additionalAlertManagerConfigs, SecretKeySelector additionalAlertRelabelConfigs, List<Argument> additionalArgs, SecretKeySelector additionalScrapeConfigs, Affinity affinity, AlertingSpec alerting, Boolean allowOverlappingBlocks, APIServerConfig apiserverConfig, ArbitraryFSAccessThroughSMsConfig arbitraryFSAccessThroughSMs, Boolean automountServiceAccountToken, String baseImage, String bodySizeLimit, List<String> configMaps, List<Container> containers, Boolean convertClassicHistogramsToNHCB, Boolean disableCompaction, PodDNSConfig dnsConfig, String dnsPolicy, Boolean enableAdminAPI, List<String> enableFeatures, Boolean enableOTLPReceiver, Boolean enableRemoteWriteReceiver, Boolean enableServiceLinks, String enforcedBodySizeLimit, Long enforcedKeepDroppedTargets, Long enforcedLabelLimit, Long enforcedLabelNameLengthLimit, Long enforcedLabelValueLengthLimit, String enforcedNamespaceLabel, Long enforcedSampleLimit, Long enforcedTargetLimit, String evaluationInterval, List<ObjectReference> excludedFromEnforcement, Exemplars exemplars, Map<String,String> externalLabels, String externalUrl, List<HostAlias> hostAliases, Boolean hostNetwork, Boolean hostUsers, Boolean ignoreNamespaceSelectors, String image, String imagePullPolicy, List<LocalObjectReference> imagePullSecrets, List<Container> initContainers, Long keepDroppedTargets, Long labelLimit, Long labelNameLengthLimit, Long labelValueLengthLimit, Boolean listenLocal, String logFormat, String logLevel, Integer maximumStartupDurationSeconds, Integer minReadySeconds, String nameEscapingScheme, String nameValidationScheme, Map<String,String> nodeSelector, OTLPConfig otlp, Boolean overrideHonorLabels, Boolean overrideHonorTimestamps, Boolean paused, io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy, String podManagementPolicy, EmbeddedObjectMetadata podMetadata, LabelSelector podMonitorNamespaceSelector, LabelSelector podMonitorSelector, List<String> podTargetLabels, String portName, String priorityClassName, LabelSelector probeNamespaceSelector, LabelSelector probeSelector, String prometheusExternalLabelName, List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce, QuerySpec query, String queryLogFile, String reloadStrategy, List<RemoteReadSpec> remoteRead, List<RemoteWriteSpec> remoteWrite, List<String> remoteWriteReceiverMessageVersions, String replicaExternalLabelName, Integer replicas, ResourceRequirements resources, String retention, String retentionSize, String routePrefix, LabelSelector ruleNamespaceSelector, String ruleQueryOffset, LabelSelector ruleSelector, Rules rules, RuntimeConfig runtime, Long sampleLimit, String schedulerName, List<ScrapeClass> scrapeClasses, Boolean scrapeClassicHistograms, LabelSelector scrapeConfigNamespaceSelector, LabelSelector scrapeConfigSelector, String scrapeFailureLogFile, String scrapeInterval, Boolean scrapeNativeHistograms, List<String> scrapeProtocols, String scrapeTimeout, List<String> secrets, PodSecurityContext securityContext, String serviceAccountName, String serviceDiscoveryRole, LabelSelector serviceMonitorNamespaceSelector, LabelSelector serviceMonitorSelector, String serviceName, String sha, ShardRetentionPolicy shardRetentionPolicy, ShardingStrategy shardingStrategy, Integer shards, StorageSpec storage, String tag, Long targetLimit, Long terminationGracePeriodSeconds, ThanosSpec thanos, List<Toleration> tolerations, List<TopologySpreadConstraint> topologySpreadConstraints, TracingConfig tracingConfig, TSDBSpec tsdb, StatefulSetUpdateStrategy updateStrategy, String version, List<VolumeMount> volumeMounts, List<Volume> volumes, Boolean walCompression, PrometheusWebSpec web)
-
-
Method Detail
-
getAdditionalAlertManagerConfigs
public SecretKeySelector getAdditionalAlertManagerConfigs()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setAdditionalAlertManagerConfigs
public void setAdditionalAlertManagerConfigs(SecretKeySelector additionalAlertManagerConfigs)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAdditionalAlertRelabelConfigs
public SecretKeySelector getAdditionalAlertRelabelConfigs()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setAdditionalAlertRelabelConfigs
public void setAdditionalAlertRelabelConfigs(SecretKeySelector additionalAlertRelabelConfigs)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAdditionalArgs
public List<Argument> getAdditionalArgs()
additionalArgs allows setting additional arguments for the 'prometheus' 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 Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus 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 'prometheus' 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 Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus 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.
-
getAdditionalScrapeConfigs
public SecretKeySelector getAdditionalScrapeConfigs()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setAdditionalScrapeConfigs
public void setAdditionalScrapeConfigs(SecretKeySelector additionalScrapeConfigs)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAffinity
public Affinity getAffinity()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setAffinity
public void setAffinity(Affinity affinity)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAlerting
public AlertingSpec getAlerting()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setAlerting
public void setAlerting(AlertingSpec alerting)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAllowOverlappingBlocks
public Boolean getAllowOverlappingBlocks()
allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.Deprecated: this flag has no effect for Prometheus >= 2.39.0 where overlapping blocks are enabled by default.
-
setAllowOverlappingBlocks
public void setAllowOverlappingBlocks(Boolean allowOverlappingBlocks)
allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.Deprecated: this flag has no effect for Prometheus >= 2.39.0 where overlapping blocks are enabled by default.
-
getApiserverConfig
public APIServerConfig getApiserverConfig()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setApiserverConfig
public void setApiserverConfig(APIServerConfig apiserverConfig)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getArbitraryFSAccessThroughSMs
public ArbitraryFSAccessThroughSMsConfig getArbitraryFSAccessThroughSMs()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setArbitraryFSAccessThroughSMs
public void setArbitraryFSAccessThroughSMs(ArbitraryFSAccessThroughSMsConfig arbitraryFSAccessThroughSMs)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getAutomountServiceAccountToken
public Boolean getAutomountServiceAccountToken()
automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn't set, the operator mounts the service account token by default.**Warning:** be aware that by default, Prometheus requires the service account token for Kubernetes service discovery. It is possible to use strategic merge patch to project the service account token into the 'prometheus' container.
-
setAutomountServiceAccountToken
public void setAutomountServiceAccountToken(Boolean automountServiceAccountToken)
automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn't set, the operator mounts the service account token by default.**Warning:** be aware that by default, Prometheus requires the service account token for Kubernetes service discovery. It is possible to use strategic merge patch to project the service account token into the 'prometheus' container.
-
getBaseImage
public String getBaseImage()
baseImage is deprecated: use 'spec.image' instead.
-
setBaseImage
public void setBaseImage(String baseImage)
baseImage is deprecated: use 'spec.image' instead.
-
getBodySizeLimit
public String getBodySizeLimit()
bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.
-
setBodySizeLimit
public void setBodySizeLimit(String bodySizeLimit)
bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.
-
getConfigMaps
public List<String> getConfigMaps()
configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. The ConfigMaps are mounted into /etc/prometheus/configmaps/<configmap-name> in the 'prometheus' container.
-
setConfigMaps
public void setConfigMaps(List<String> configMaps)
configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. The ConfigMaps are mounted into /etc/prometheus/configmaps/<configmap-name> in the 'prometheus' container.
-
getContainers
public List<Container> getContainers()
containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods 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 names of containers managed by the operator are: * `prometheus` * `config-reloader` * `thanos-sidecar`
Overriding containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator.
-
setContainers
public void setContainers(List<Container> containers)
containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods 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 names of containers managed by the operator are: * `prometheus` * `config-reloader` * `thanos-sidecar`
Overriding containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator.
-
getConvertClassicHistogramsToNHCB
public Boolean getConvertClassicHistogramsToNHCB()
convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.It requires Prometheus >= v3.4.0.
-
setConvertClassicHistogramsToNHCB
public void setConvertClassicHistogramsToNHCB(Boolean convertClassicHistogramsToNHCB)
convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.It requires Prometheus >= v3.4.0.
-
getDisableCompaction
public Boolean getDisableCompaction()
disableCompaction when true, the Prometheus compaction is disabled. When `spec.thanos.objectStorageConfig` or `spec.objectStorageConfigFile` are defined, the operator automatically disables block compaction to avoid race conditions during block uploads (as the Thanos documentation recommends).
-
setDisableCompaction
public void setDisableCompaction(Boolean disableCompaction)
disableCompaction when true, the Prometheus compaction is disabled. When `spec.thanos.objectStorageConfig` or `spec.objectStorageConfigFile` are defined, the operator automatically disables block compaction to avoid race conditions during block uploads (as the Thanos documentation recommends).
-
getDnsConfig
public PodDNSConfig getDnsConfig()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. 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)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getDnsPolicy
public String getDnsPolicy()
dnsPolicy defines the DNS policy for the pods.
-
setDnsPolicy
public void setDnsPolicy(String dnsPolicy)
dnsPolicy defines the DNS policy for the pods.
-
getEnableAdminAPI
public Boolean getEnableAdminAPI()
enableAdminAPI defines access to the Prometheus web admin API.WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so.
For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis
-
setEnableAdminAPI
public void setEnableAdminAPI(Boolean enableAdminAPI)
enableAdminAPI defines access to the Prometheus web admin API.WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so.
For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis
-
getEnableFeatures
public List<String> getEnableFeatures()
enableFeatures enables access to Prometheus 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://prometheus.io/docs/prometheus/latest/feature_flags/
-
setEnableFeatures
public void setEnableFeatures(List<String> enableFeatures)
enableFeatures enables access to Prometheus 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://prometheus.io/docs/prometheus/latest/feature_flags/
-
getEnableOTLPReceiver
public Boolean getEnableOTLPReceiver()
enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.Note that the OTLP receiver endpoint is automatically enabled if `.spec.otlpConfig` is defined.
It requires Prometheus >= v2.47.0.
-
setEnableOTLPReceiver
public void setEnableOTLPReceiver(Boolean enableOTLPReceiver)
enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.Note that the OTLP receiver endpoint is automatically enabled if `.spec.otlpConfig` is defined.
It requires Prometheus >= v2.47.0.
-
getEnableRemoteWriteReceiver
public Boolean getEnableRemoteWriteReceiver()
enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver
It requires Prometheus >= v2.33.0.
-
setEnableRemoteWriteReceiver
public void setEnableRemoteWriteReceiver(Boolean enableRemoteWriteReceiver)
enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver
It requires Prometheus >= v2.33.0.
-
getEnableServiceLinks
public Boolean getEnableServiceLinks()
enableServiceLinks defines whether information about services should be injected into pod's environment variables
-
setEnableServiceLinks
public void setEnableServiceLinks(Boolean enableServiceLinks)
enableServiceLinks defines whether information about services should be injected into pod's environment variables
-
getEnforcedBodySizeLimit
public String getEnforcedBodySizeLimit()
enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.It requires Prometheus >= v2.28.0.
When both `enforcedBodySizeLimit` and `bodySizeLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedBodySizeLimit` is greater than the `bodySizeLimit`, the `bodySizeLimit` will be set to `enforcedBodySizeLimit`.
* Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.
-
setEnforcedBodySizeLimit
public void setEnforcedBodySizeLimit(String enforcedBodySizeLimit)
enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.It requires Prometheus >= v2.28.0.
When both `enforcedBodySizeLimit` and `bodySizeLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedBodySizeLimit` is greater than the `bodySizeLimit`, the `bodySizeLimit` will be set to `enforcedBodySizeLimit`.
* Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.
-
getEnforcedKeepDroppedTargets
public Long getEnforcedKeepDroppedTargets()
enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any `spec.keepDroppedTargets` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.keepDroppedTargets` is greater than zero and less than `spec.enforcedKeepDroppedTargets`.It requires Prometheus >= v2.47.0.
When both `enforcedKeepDroppedTargets` and `keepDroppedTargets` are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedKeepDroppedTargets` is greater than the `keepDroppedTargets`, the `keepDroppedTargets` will be set to `enforcedKeepDroppedTargets`.
* Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.
-
setEnforcedKeepDroppedTargets
public void setEnforcedKeepDroppedTargets(Long enforcedKeepDroppedTargets)
enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any `spec.keepDroppedTargets` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.keepDroppedTargets` is greater than zero and less than `spec.enforcedKeepDroppedTargets`.It requires Prometheus >= v2.47.0.
When both `enforcedKeepDroppedTargets` and `keepDroppedTargets` are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedKeepDroppedTargets` is greater than the `keepDroppedTargets`, the `keepDroppedTargets` will be set to `enforcedKeepDroppedTargets`.
* Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.
-
getEnforcedLabelLimit
public Long getEnforcedLabelLimit()
enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelLimit` and `labelLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelLimit` is greater than the `labelLimit`, the `labelLimit` will be set to `enforcedLabelLimit`.
* Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.
-
setEnforcedLabelLimit
public void setEnforcedLabelLimit(Long enforcedLabelLimit)
enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelLimit` and `labelLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelLimit` is greater than the `labelLimit`, the `labelLimit` will be set to `enforcedLabelLimit`.
* Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.
-
getEnforcedLabelNameLengthLimit
public Long getEnforcedLabelNameLengthLimit()
enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any `spec.labelNameLengthLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is greater than zero and less than `spec.enforcedLabelNameLengthLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelNameLengthLimit` and `labelNameLengthLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelNameLengthLimit` is greater than the `labelNameLengthLimit`, the `labelNameLengthLimit` will be set to `enforcedLabelNameLengthLimit`.
* Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.
-
setEnforcedLabelNameLengthLimit
public void setEnforcedLabelNameLengthLimit(Long enforcedLabelNameLengthLimit)
enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any `spec.labelNameLengthLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is greater than zero and less than `spec.enforcedLabelNameLengthLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelNameLengthLimit` and `labelNameLengthLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelNameLengthLimit` is greater than the `labelNameLengthLimit`, the `labelNameLengthLimit` will be set to `enforcedLabelNameLengthLimit`.
* Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.
-
getEnforcedLabelValueLengthLimit
public Long getEnforcedLabelValueLengthLimit()
enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any `spec.labelValueLengthLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is greater than zero and less than `spec.enforcedLabelValueLengthLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelValueLengthLimit` and `labelValueLengthLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelValueLengthLimit` is greater than the `labelValueLengthLimit`, the `labelValueLengthLimit` will be set to `enforcedLabelValueLengthLimit`.
* Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.
-
setEnforcedLabelValueLengthLimit
public void setEnforcedLabelValueLengthLimit(Long enforcedLabelValueLengthLimit)
enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any `spec.labelValueLengthLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is greater than zero and less than `spec.enforcedLabelValueLengthLimit`.It requires Prometheus >= v2.27.0.
When both `enforcedLabelValueLengthLimit` and `labelValueLengthLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedLabelValueLengthLimit` is greater than the `labelValueLengthLimit`, the `labelValueLengthLimit` will be set to `enforcedLabelValueLengthLimit`.
* Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.
-
getEnforcedNamespaceLabel
public String getEnforcedNamespaceLabel()
enforcedNamespaceLabel when not empty, a label will be added to:1. All metrics scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig` objects. 2. All metrics generated from recording rules defined in `PrometheusRule` objects. 3. All alerts generated from alerting rules defined in `PrometheusRule` objects. 4. All vector selectors of PromQL expressions defined in `PrometheusRule` objects.
The label will not added for objects referenced in `spec.excludedFromEnforcement`.
The label's name is this field's value. The label's value is the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe`, `PrometheusRule` or `ScrapeConfig` object.
-
setEnforcedNamespaceLabel
public void setEnforcedNamespaceLabel(String enforcedNamespaceLabel)
enforcedNamespaceLabel when not empty, a label will be added to:1. All metrics scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig` objects. 2. All metrics generated from recording rules defined in `PrometheusRule` objects. 3. All alerts generated from alerting rules defined in `PrometheusRule` objects. 4. All vector selectors of PromQL expressions defined in `PrometheusRule` objects.
The label will not added for objects referenced in `spec.excludedFromEnforcement`.
The label's name is this field's value. The label's value is the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe`, `PrometheusRule` or `ScrapeConfig` object.
-
getEnforcedSampleLimit
public Long getEnforcedSampleLimit()
enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.sampleLimit` is greater than zero and less than `spec.enforcedSampleLimit`.It is meant to be used by admins to keep the overall number of samples/series under a desired limit.
When both `enforcedSampleLimit` and `sampleLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedSampleLimit` is greater than the `sampleLimit`, the `sampleLimit` will be set to `enforcedSampleLimit`.
* Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.
-
setEnforcedSampleLimit
public void setEnforcedSampleLimit(Long enforcedSampleLimit)
enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.sampleLimit` is greater than zero and less than `spec.enforcedSampleLimit`.It is meant to be used by admins to keep the overall number of samples/series under a desired limit.
When both `enforcedSampleLimit` and `sampleLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedSampleLimit` is greater than the `sampleLimit`, the `sampleLimit` will be set to `enforcedSampleLimit`.
* Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.
-
getEnforcedTargetLimit
public Long getEnforcedTargetLimit()
enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`.It is meant to be used by admins to to keep the overall number of targets under a desired limit.
When both `enforcedTargetLimit` and `targetLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedTargetLimit` is greater than the `targetLimit`, the `targetLimit` will be set to `enforcedTargetLimit`.
* Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.
-
setEnforcedTargetLimit
public void setEnforcedTargetLimit(Long enforcedTargetLimit)
enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`.It is meant to be used by admins to to keep the overall number of targets under a desired limit.
When both `enforcedTargetLimit` and `targetLimit` are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0).
If Prometheus version is >= 2.45.0 and the `enforcedTargetLimit` is greater than the `targetLimit`, the `targetLimit` will be set to `enforcedTargetLimit`.
* Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.
-
getEvaluationInterval
public String getEvaluationInterval()
evaluationInterval defines the interval between rule evaluations. Default: "30s"
-
setEvaluationInterval
public void setEvaluationInterval(String evaluationInterval)
evaluationInterval defines the interval between rule evaluations. Default: "30s"
-
getExcludedFromEnforcement
public List<ObjectReference> getExcludedFromEnforcement()
excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.It is only applicable if `spec.enforcedNamespaceLabel` set to true.
-
setExcludedFromEnforcement
public void setExcludedFromEnforcement(List<ObjectReference> excludedFromEnforcement)
excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.It is only applicable if `spec.enforcedNamespaceLabel` set to true.
-
getExemplars
public Exemplars getExemplars()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setExemplars
public void setExemplars(Exemplars exemplars)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getExternalLabels
public Map<String,String> getExternalLabels()
externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName` take precedence over this list.
-
setExternalLabels
public void setExternalLabels(Map<String,String> externalLabels)
externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName` take precedence over this list.
-
getExternalUrl
public String getExternalUrl()
externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).
-
setExternalUrl
public void setExternalUrl(String externalUrl)
externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).
-
getHostAliases
public List<HostAlias> getHostAliases()
hostAliases defines the optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
-
setHostAliases
public void setHostAliases(List<HostAlias> hostAliases)
hostAliases defines the optional list of hosts and IPs that will be injected into the Pod's hosts file if specified.
-
getHostNetwork
public Boolean getHostNetwork()
hostNetwork defines the host's network namespace if true.Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).
When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet` automatically (unless `.spec.DNSPolicy` is set to a different value).
-
setHostNetwork
public void setHostNetwork(Boolean hostNetwork)
hostNetwork defines the host's network namespace if true.Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).
When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet` automatically (unless `.spec.DNSPolicy` is set to a different value).
-
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.
-
getIgnoreNamespaceSelectors
public Boolean getIgnoreNamespaceSelectors()
ignoreNamespaceSelectors when true, `spec.namespaceSelector` from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.
-
setIgnoreNamespaceSelectors
public void setIgnoreNamespaceSelectors(Boolean ignoreNamespaceSelectors)
ignoreNamespaceSelectors when true, `spec.namespaceSelector` from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.
-
getImage
public String getImage()
image defines the container image name for Prometheus. If specified, it takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha` fields.Specifying `spec.version` is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.
If neither `spec.image` nor `spec.baseImage` are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.
-
setImage
public void setImage(String image)
image defines the container image name for Prometheus. If specified, it takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha` fields.Specifying `spec.version` is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.
If neither `spec.image` nor `spec.baseImage` are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.
-
getImagePullPolicy
public String getImagePullPolicy()
imagePullPolicy defines the image pull policy for the 'prometheus', '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)
imagePullPolicy defines the image pull policy for the 'prometheus', '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<LocalObjectReference> getImagePullSecrets()
imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
-
setImagePullSecrets
public void setImagePullSecrets(List<LocalObjectReference> imagePullSecrets)
imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
-
getInitContainers
public List<Container> getInitContainers()
initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus 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/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.The names of init container name managed by the operator are: * `init-config-reloader`.
Overriding init containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator.
-
setInitContainers
public void setInitContainers(List<Container> initContainers)
initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus 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/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.The names of init container name managed by the operator are: * `init-config-reloader`.
Overriding init containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator.
-
getKeepDroppedTargets
public Long getKeepDroppedTargets()
keepDroppedTargets defines the per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.It requires Prometheus >= v2.47.0.
Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.
-
setKeepDroppedTargets
public void setKeepDroppedTargets(Long keepDroppedTargets)
keepDroppedTargets defines the per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit.It requires Prometheus >= v2.47.0.
Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.
-
getLabelLimit
public Long getLabelLimit()
labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.
-
setLabelLimit
public void setLabelLimit(Long labelLimit)
labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.
-
getLabelNameLengthLimit
public Long getLabelNameLengthLimit()
labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.
-
setLabelNameLengthLimit
public void setLabelNameLengthLimit(Long labelNameLengthLimit)
labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.
-
getLabelValueLengthLimit
public Long getLabelValueLengthLimit()
labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.
-
setLabelValueLengthLimit
public void setLabelValueLengthLimit(Long labelValueLengthLimit)
labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.
-
getListenLocal
public Boolean getListenLocal()
listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP's address.
-
setListenLocal
public void setListenLocal(Boolean listenLocal)
listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP's address.
-
getLogFormat
public String getLogFormat()
logFormat for Log level for Prometheus and the config-reloader sidecar.
-
setLogFormat
public void setLogFormat(String logFormat)
logFormat for Log level for Prometheus and the config-reloader sidecar.
-
getLogLevel
public String getLogLevel()
logLevel for Prometheus and the config-reloader sidecar.
-
setLogLevel
public void setLogLevel(String logLevel)
logLevel for Prometheus and the config-reloader sidecar.
-
getMaximumStartupDurationSeconds
public Integer getMaximumStartupDurationSeconds()
maximumStartupDurationSeconds defines the maximum time that the `prometheus` container's startup probe will wait before being considered failed. The startup probe will return success after the WAL replay is complete. If set, the value should be greater than 60 (seconds). Otherwise it will be equal to 900 seconds (15 minutes).
-
setMaximumStartupDurationSeconds
public void setMaximumStartupDurationSeconds(Integer maximumStartupDurationSeconds)
maximumStartupDurationSeconds defines the maximum time that the `prometheus` container's startup probe will wait before being considered failed. The startup probe will return success after the WAL replay is complete. If set, the value should be greater than 60 (seconds). Otherwise it will be equal to 900 seconds (15 minutes).
-
getMinReadySeconds
public Integer getMinReadySeconds()
minReadySeconds defines the 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)
minReadySeconds defines the 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.
-
getNameEscapingScheme
public String getNameEscapingScheme()
nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.It requires Prometheus >= v3.4.0.
-
setNameEscapingScheme
public void setNameEscapingScheme(String nameEscapingScheme)
nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.It requires Prometheus >= v3.4.0.
-
getNameValidationScheme
public String getNameValidationScheme()
nameValidationScheme defines the validation scheme for metric and label names.It requires Prometheus >= v2.55.0.
-
setNameValidationScheme
public void setNameValidationScheme(String nameValidationScheme)
nameValidationScheme defines the validation scheme for metric and label names.It requires Prometheus >= v2.55.0.
-
getNodeSelector
public Map<String,String> getNodeSelector()
nodeSelector defines on which Nodes the Pods are scheduled.
-
setNodeSelector
public void setNodeSelector(Map<String,String> nodeSelector)
nodeSelector defines on which Nodes the Pods are scheduled.
-
getOtlp
public OTLPConfig getOtlp()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setOtlp
public void setOtlp(OTLPConfig otlp)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getOverrideHonorLabels
public Boolean getOverrideHonorLabels()
overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped datato "exported_" for all targets created from ServiceMonitor, PodMonitor and
ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,`OverrideHonorLabels:true` enforces `honorLabels:false` for all ServiceMonitor, PodMonitor and ScrapeConfig objects.
-
setOverrideHonorLabels
public void setOverrideHonorLabels(Boolean overrideHonorLabels)
overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped datato "exported_" for all targets created from ServiceMonitor, PodMonitor and
ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,`OverrideHonorLabels:true` enforces `honorLabels:false` for all ServiceMonitor, PodMonitor and ScrapeConfig objects.
-
getOverrideHonorTimestamps
public Boolean getOverrideHonorTimestamps()
overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.
-
setOverrideHonorTimestamps
public void setOverrideHonorTimestamps(Boolean overrideHonorTimestamps)
overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.
-
getPaused
public Boolean getPaused()
paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.
-
setPaused
public void setPaused(Boolean paused)
paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.
-
getPersistentVolumeClaimRetentionPolicy
public io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicy getPersistentVolumeClaimRetentionPolicy()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setPersistentVolumeClaimRetentionPolicy
public void setPersistentVolumeClaimRetentionPolicy(io.fabric8.kubernetes.api.model.apps.StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getPodManagementPolicy
public String getPodManagementPolicy()
podManagementPolicy defines the policy for creating/deleting pods when scaling up and down.Unlike the default StatefulSet behavior, the default policy is `Parallel` to avoid manual intervention in case a pod gets stuck during a rollout.
Note that updating this value implies the recreation of the StatefulSet which incurs a service outage.
-
setPodManagementPolicy
public void setPodManagementPolicy(String podManagementPolicy)
podManagementPolicy defines the policy for creating/deleting pods when scaling up and down.Unlike the default StatefulSet behavior, the default policy is `Parallel` to avoid manual intervention in case a pod gets stuck during a rollout.
Note that updating this value implies the recreation of the StatefulSet which incurs a service outage.
-
getPodMetadata
public EmbeddedObjectMetadata getPodMetadata()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. 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)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getPodMonitorNamespaceSelector
public LabelSelector getPodMonitorNamespaceSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setPodMonitorNamespaceSelector
public void setPodMonitorNamespaceSelector(LabelSelector podMonitorNamespaceSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getPodMonitorSelector
public LabelSelector getPodMonitorSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setPodMonitorSelector
public void setPodMonitorSelector(LabelSelector podMonitorSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getPodTargetLabels
public List<String> getPodTargetLabels()
podTargetLabels are appended to the `spec.podTargetLabels` field of all PodMonitor and ServiceMonitor objects.
-
setPodTargetLabels
public void setPodTargetLabels(List<String> podTargetLabels)
podTargetLabels are appended to the `spec.podTargetLabels` field of all PodMonitor and ServiceMonitor objects.
-
getPortName
public String getPortName()
portName used for the pods and governing service. Default: "web"
-
setPortName
public void setPortName(String portName)
portName used for the pods and governing service. Default: "web"
-
getPriorityClassName
public String getPriorityClassName()
priorityClassName assigned to the Pods.
-
setPriorityClassName
public void setPriorityClassName(String priorityClassName)
priorityClassName assigned to the Pods.
-
getProbeNamespaceSelector
public LabelSelector getProbeNamespaceSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setProbeNamespaceSelector
public void setProbeNamespaceSelector(LabelSelector probeNamespaceSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getProbeSelector
public LabelSelector getProbeSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setProbeSelector
public void setProbeSelector(LabelSelector probeSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getPrometheusExternalLabelName
public String getPrometheusExternalLabelName()
prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will _not_ be added when the field is set to the empty string (`""`).Default: "prometheus"
-
setPrometheusExternalLabelName
public void setPrometheusExternalLabelName(String prometheusExternalLabelName)
prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will _not_ be added when the field is set to the empty string (`""`).Default: "prometheus"
-
getPrometheusRulesExcludedFromEnforce
public List<PrometheusRuleExcludeConfig> getPrometheusRulesExcludedFromEnforce()
prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn't apply. This is only relevant when `spec.enforcedNamespaceLabel` is set to true. Deprecated: use `spec.excludedFromEnforcement` instead.
-
setPrometheusRulesExcludedFromEnforce
public void setPrometheusRulesExcludedFromEnforce(List<PrometheusRuleExcludeConfig> prometheusRulesExcludedFromEnforce)
prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn't apply. This is only relevant when `spec.enforcedNamespaceLabel` is set to true. Deprecated: use `spec.excludedFromEnforcement` instead.
-
getQuery
public QuerySpec getQuery()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setQuery
public void setQuery(QuerySpec query)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getQueryLogFile
public String getQueryLogFile()
queryLogFile specifies where the file to which PromQL queries are logged.If the filename has an empty path, e.g. 'query.log', The Prometheus Pods will mount the file into an emptyDir volume at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/query.log', you must mount a volume in the specified directory and it must be writable. This is because the prometheus container runs with a read-only root filesystem for security reasons. Alternatively, the location can be set to a standard I/O stream, e.g. `/dev/stdout`, to log query information to the default Prometheus log stream.
-
setQueryLogFile
public void setQueryLogFile(String queryLogFile)
queryLogFile specifies where the file to which PromQL queries are logged.If the filename has an empty path, e.g. 'query.log', The Prometheus Pods will mount the file into an emptyDir volume at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/query.log', you must mount a volume in the specified directory and it must be writable. This is because the prometheus container runs with a read-only root filesystem for security reasons. Alternatively, the location can be set to a standard I/O stream, e.g. `/dev/stdout`, to log query information to the default Prometheus log stream.
-
getReloadStrategy
public String getReloadStrategy()
reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.
-
setReloadStrategy
public void setReloadStrategy(String reloadStrategy)
reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.
-
getRemoteRead
public List<RemoteReadSpec> getRemoteRead()
remoteRead defines the list of remote read configurations.
-
setRemoteRead
public void setRemoteRead(List<RemoteReadSpec> remoteRead)
remoteRead defines the list of remote read configurations.
-
getRemoteWrite
public List<RemoteWriteSpec> getRemoteWrite()
remoteWrite defines the list of remote write configurations.
-
setRemoteWrite
public void setRemoteWrite(List<RemoteWriteSpec> remoteWrite)
remoteWrite defines the list of remote write configurations.
-
getRemoteWriteReceiverMessageVersions
public List<String> getRemoteWriteReceiverMessageVersions()
remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.It requires Prometheus >= v2.54.0.
-
setRemoteWriteReceiverMessageVersions
public void setRemoteWriteReceiverMessageVersions(List<String> remoteWriteReceiverMessageVersions)
remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.It requires Prometheus >= v2.54.0.
-
getReplicaExternalLabelName
public String getReplicaExternalLabelName()
replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will _not_ be added when the field is set to the empty string (`""`).Default: "prometheus_replica"
-
setReplicaExternalLabelName
public void setReplicaExternalLabelName(String replicaExternalLabelName)
replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will _not_ be added when the field is set to the empty string (`""`).Default: "prometheus_replica"
-
getReplicas
public Integer getReplicas()
replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. `spec.replicas` multiplied by `spec.shards` is the total number of Pods created.Default: 1
-
setReplicas
public void setReplicas(Integer replicas)
replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. `spec.replicas` multiplied by `spec.shards` is the total number of Pods created.Default: 1
-
getResources
public ResourceRequirements getResources()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setResources
public void setResources(ResourceRequirements resources)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getRetention
public String getRetention()
retention defines how long to retain the Prometheus data.Default: "24h" if `spec.retention` and `spec.retentionSize` are empty.
-
setRetention
public void setRetention(String retention)
retention defines how long to retain the Prometheus data.Default: "24h" if `spec.retention` and `spec.retentionSize` are empty.
-
getRetentionSize
public String getRetentionSize()
retentionSize defines the maximum number of bytes used by the Prometheus data.
-
setRetentionSize
public void setRetentionSize(String retentionSize)
retentionSize defines the maximum number of bytes used by the Prometheus data.
-
getRoutePrefix
public String getRoutePrefix()
routePrefix defines the route prefix Prometheus registers HTTP handlers for.This is useful when using `spec.externalURL`, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`.
-
setRoutePrefix
public void setRoutePrefix(String routePrefix)
routePrefix defines the route prefix Prometheus registers HTTP handlers for.This is useful when using `spec.externalURL`, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`.
-
getRuleNamespaceSelector
public LabelSelector getRuleNamespaceSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setRuleNamespaceSelector
public void setRuleNamespaceSelector(LabelSelector ruleNamespaceSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getRuleQueryOffset
public String getRuleQueryOffset()
ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. It requires Prometheus >= v2.53.0.
-
setRuleQueryOffset
public void setRuleQueryOffset(String ruleQueryOffset)
ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. It requires Prometheus >= v2.53.0.
-
getRuleSelector
public LabelSelector getRuleSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setRuleSelector
public void setRuleSelector(LabelSelector ruleSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getRules
public Rules getRules()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setRules
public void setRules(Rules rules)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getRuntime
public RuntimeConfig getRuntime()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setRuntime
public void setRuntime(RuntimeConfig runtime)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getSampleLimit
public Long getSampleLimit()
sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.
-
setSampleLimit
public void setSampleLimit(Long sampleLimit)
sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.
-
getSchedulerName
public String getSchedulerName()
schedulerName defines the scheduler to use for Pod scheduling. If not specified, the default scheduler is used.
-
setSchedulerName
public void setSchedulerName(String schedulerName)
schedulerName defines the scheduler to use for Pod scheduling. If not specified, the default scheduler is used.
-
getScrapeClasses
public List<ScrapeClass> getScrapeClasses()
scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.This is an *experimental feature*, it may change in any upcoming release in a breaking way.
-
setScrapeClasses
public void setScrapeClasses(List<ScrapeClass> scrapeClasses)
scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.This is an *experimental feature*, it may change in any upcoming release in a breaking way.
-
getScrapeClassicHistograms
public Boolean getScrapeClassicHistograms()
scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.Notice: `scrapeClassicHistograms` corresponds to the `always_scrape_classic_histograms` field in the Prometheus configuration.
It requires Prometheus >= v3.5.0.
-
setScrapeClassicHistograms
public void setScrapeClassicHistograms(Boolean scrapeClassicHistograms)
scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.Notice: `scrapeClassicHistograms` corresponds to the `always_scrape_classic_histograms` field in the Prometheus configuration.
It requires Prometheus >= v3.5.0.
-
getScrapeConfigNamespaceSelector
public LabelSelector getScrapeConfigNamespaceSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setScrapeConfigNamespaceSelector
public void setScrapeConfigNamespaceSelector(LabelSelector scrapeConfigNamespaceSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getScrapeConfigSelector
public LabelSelector getScrapeConfigSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setScrapeConfigSelector
public void setScrapeConfigSelector(LabelSelector scrapeConfigSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getScrapeFailureLogFile
public String getScrapeFailureLogFile()
scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.If the filename has an empty path, e.g. 'file.log', The Prometheus Pods will mount the file into an emptyDir volume at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/file.log', you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.
-
setScrapeFailureLogFile
public void setScrapeFailureLogFile(String scrapeFailureLogFile)
scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.If the filename has an empty path, e.g. 'file.log', The Prometheus Pods will mount the file into an emptyDir volume at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/file.log', you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.
-
getScrapeInterval
public String getScrapeInterval()
scrapeInterval defines interval between consecutive scrapes.Default: "30s"
-
setScrapeInterval
public void setScrapeInterval(String scrapeInterval)
scrapeInterval defines interval between consecutive scrapes.Default: "30s"
-
getScrapeNativeHistograms
public Boolean getScrapeNativeHistograms()
scrapeNativeHistograms defines whether to enable scraping of native histograms. It requires Prometheus >= v3.8.0.
-
setScrapeNativeHistograms
public void setScrapeNativeHistograms(Boolean scrapeNativeHistograms)
scrapeNativeHistograms defines whether to enable scraping of native histograms. It requires Prometheus >= v3.8.0.
-
getScrapeProtocols
public List<String> getScrapeProtocols()
scrapeProtocols defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred).If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
`PrometheusText1.0.0` requires Prometheus >= v3.0.0.
-
setScrapeProtocols
public void setScrapeProtocols(List<String> scrapeProtocols)
scrapeProtocols defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred).If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
`PrometheusText1.0.0` requires Prometheus >= v3.0.0.
-
getScrapeTimeout
public String getScrapeTimeout()
scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
-
setScrapeTimeout
public void setScrapeTimeout(String scrapeTimeout)
scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
-
getSecrets
public List<String> getSecrets()
secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. The Secrets are mounted into /etc/prometheus/secrets/<secret-name> in the 'prometheus' container.
-
setSecrets
public void setSecrets(List<String> secrets)
secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. The Secrets are mounted into /etc/prometheus/secrets/<secret-name> in the 'prometheus' container.
-
getSecurityContext
public PodSecurityContext getSecurityContext()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setSecurityContext
public void setSecurityContext(PodSecurityContext securityContext)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. 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 Prometheus Pods.
-
setServiceAccountName
public void setServiceAccountName(String serviceAccountName)
serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.
-
getServiceDiscoveryRole
public String getServiceDiscoveryRole()
serviceDiscoveryRole defines the service discovery role used to discover targets from `ServiceMonitor` objects and Alertmanager endpoints.If set, the value should be either "Endpoints" or "EndpointSlice". If unset, the operator assumes the "Endpoints" role.
-
setServiceDiscoveryRole
public void setServiceDiscoveryRole(String serviceDiscoveryRole)
serviceDiscoveryRole defines the service discovery role used to discover targets from `ServiceMonitor` objects and Alertmanager endpoints.If set, the value should be either "Endpoints" or "EndpointSlice". If unset, the operator assumes the "Endpoints" role.
-
getServiceMonitorNamespaceSelector
public LabelSelector getServiceMonitorNamespaceSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setServiceMonitorNamespaceSelector
public void setServiceMonitorNamespaceSelector(LabelSelector serviceMonitorNamespaceSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getServiceMonitorSelector
public LabelSelector getServiceMonitorSelector()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setServiceMonitorSelector
public void setServiceMonitorSelector(LabelSelector serviceMonitorSelector)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getServiceName
public String getServiceName()
serviceName defines 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 Prometheus/PrometheusAgent 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 `prometheus-operated` for Prometheus resources, or `prometheus-agent-operated` for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent 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)
serviceName defines 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 Prometheus/PrometheusAgent 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 `prometheus-operated` for Prometheus resources, or `prometheus-agent-operated` for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent 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.
-
getSha
public String getSha()
sha is deprecated: use 'spec.image' instead. The image's digest can be specified as part of the image name.
-
setSha
public void setSha(String sha)
sha is deprecated: use 'spec.image' instead. The image's digest can be specified as part of the image name.
-
getShardRetentionPolicy
public ShardRetentionPolicy getShardRetentionPolicy()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setShardRetentionPolicy
public void setShardRetentionPolicy(ShardRetentionPolicy shardRetentionPolicy)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getShardingStrategy
public ShardingStrategy getShardingStrategy()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setShardingStrategy
public void setShardingStrategy(ShardingStrategy shardingStrategy)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getShards
public Integer getShards()
shards defines the number of shards to distribute the scraped targets onto.`spec.replicas` multiplied by `spec.shards` is the total number of Pods being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.
By default, the sharding of targets is performed on: * The `__address__` target's metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The `__param_target__` label for Probe resources.
Users can define their own sharding implementation by setting the `__tmp_hash` label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).
You can also disable sharding on a specific target by setting the `__tmp_disable_sharding` label with relabeling configuration. When the label value isn't empty, all Prometheus shards will scrape the target.
-
setShards
public void setShards(Integer shards)
shards defines the number of shards to distribute the scraped targets onto.`spec.replicas` multiplied by `spec.shards` is the total number of Pods being created.
When not defined, the operator assumes only one shard.
Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.
By default, the sharding of targets is performed on: * The `__address__` target's metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The `__param_target__` label for Probe resources.
Users can define their own sharding implementation by setting the `__tmp_hash` label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).
You can also disable sharding on a specific target by setting the `__tmp_disable_sharding` label with relabeling configuration. When the label value isn't empty, all Prometheus shards will scrape the target.
-
getStorage
public StorageSpec getStorage()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. 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)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getTag
public String getTag()
tag is deprecated: use 'spec.image' instead. The image's tag can be specified as part of the image name.
-
setTag
public void setTag(String tag)
tag is deprecated: use 'spec.image' instead. The image's tag can be specified as part of the image name.
-
getTargetLimit
public Long getTargetLimit()
targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.
-
setTargetLimit
public void setTargetLimit(Long targetLimit)
targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.Note that the global limit only applies to scrape objects that don't specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.
-
getTerminationGracePeriodSeconds
public Long getTerminationGracePeriodSeconds()
terminationGracePeriodSeconds defines the 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 600 seconds.
-
setTerminationGracePeriodSeconds
public void setTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds)
terminationGracePeriodSeconds defines the 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 600 seconds.
-
getThanos
public ThanosSpec getThanos()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setThanos
public void setThanos(ThanosSpec thanos)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getTolerations
public List<Toleration> getTolerations()
tolerations defines the Pods' tolerations if specified.
-
setTolerations
public void setTolerations(List<Toleration> tolerations)
tolerations defines the Pods' tolerations if specified.
-
getTopologySpreadConstraints
public List<TopologySpreadConstraint> getTopologySpreadConstraints()
topologySpreadConstraints defines the pod's topology spread constraints if specified.
-
setTopologySpreadConstraints
public void setTopologySpreadConstraints(List<TopologySpreadConstraint> topologySpreadConstraints)
topologySpreadConstraints defines the pod's topology spread constraints if specified.
-
getTracingConfig
public TracingConfig getTracingConfig()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setTracingConfig
public void setTracingConfig(TracingConfig tracingConfig)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getTsdb
public TSDBSpec getTsdb()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setTsdb
public void setTsdb(TSDBSpec tsdb)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getUpdateStrategy
public StatefulSetUpdateStrategy getUpdateStrategy()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setUpdateStrategy
public void setUpdateStrategy(StatefulSetUpdateStrategy updateStrategy)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
getVersion
public String getVersion()
version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.
-
setVersion
public void setVersion(String version)
version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.
-
getVolumeMounts
public List<VolumeMount> getVolumeMounts()
volumeMounts allows the configuration of additional VolumeMounts.VolumeMounts will be appended to other VolumeMounts in the 'prometheus' container, that are generated as a result of StorageSpec objects.
-
setVolumeMounts
public void setVolumeMounts(List<VolumeMount> volumeMounts)
volumeMounts allows the configuration of additional VolumeMounts.VolumeMounts will be appended to other VolumeMounts in the 'prometheus' container, that are generated as a result of StorageSpec objects.
-
getVolumes
public List<Volume> getVolumes()
volumes allows the 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<Volume> volumes)
volumes allows the 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.
-
getWalCompression
public Boolean getWalCompression()
walCompression defines the compression of the write-ahead log (WAL) using Snappy.WAL compression is enabled by default for Prometheus >= 2.20.0
Requires Prometheus v2.11.0 and above.
-
setWalCompression
public void setWalCompression(Boolean walCompression)
walCompression defines the compression of the write-ahead log (WAL) using Snappy.WAL compression is enabled by default for Prometheus >= 2.20.0
Requires Prometheus v2.11.0 and above.
-
getWeb
public PrometheusWebSpec getWeb()
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
setWeb
public void setWeb(PrometheusWebSpec web)
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
edit
public PrometheusSpecBuilder edit()
- Specified by:
editin interfaceEditable<PrometheusSpecBuilder>
-
toBuilder
public PrometheusSpecBuilder toBuilder()
-
-