prometheus operator v0.93.1

PrometheusAgent.spec.initContainers[].lifecycle.postStart.exec

The `PrometheusAgent` custom resource definition (CRD) defines a desired [Prometheus Agent](https://prometheus.io/blog/2021/11/16/agent/) setup to run in a Kubernetes cluster. The CRD is very similar to the `Prometheus` CRD except for features which aren't available in agent mode like rule evaluation, persistent storage and Thanos sidecar.

5 fields
PrometheusAgent.spec.initContainers[].lifecycle.postStart.exec fields and descriptions
Field / TypeDescription
apiVersion
string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind
string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata
object

No description provided.

object required

spec defines the specification of the desired behavior of the Prometheus agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

  • x-kubernetes-validations: [{"message":"replicas cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.replicas))"},{"message":"storage cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.storage))"},{"message":"shards cannot be greater than 1 when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.shards) \u0026\u0026 self.shards \u003e 1)"},{"message":"persistentVolumeClaimRetentionPolicy cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.persistentVolumeClaimRetentionPolicy))"},{"message":"scrapeConfigSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.scrapeConfigSelector))"},{"message":"probeSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.probeSelector))"},{"message":"scrapeConfigNamespaceSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.scrapeConfigNamespaceSelector))"},{"message":"probeNamespaceSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.probeNamespaceSelector))"},{"message":"serviceMonitorSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.serviceMonitorSelector))"},{"message":"serviceMonitorNamespaceSelector cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.serviceMonitorNamespaceSelector))"},{"message":"additionalScrapeConfigs cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.additionalScrapeConfigs))"},{"message":"shardingStrategy cannot be set when mode is DaemonSet","rule":"!(has(self.mode) \u0026\u0026 self.mode == 'DaemonSet' \u0026\u0026 has(self.shardingStrategy))"},{"message":"shards must be greater than or equal to the number of topology values when sharding strategy mode is Topology","rule":"!has(self.shardingStrategy) || !has(self.shardingStrategy.mode) || self.shardingStrategy.mode != 'Topology' || !has(self.shardingStrategy.topology) || !has(self.shardingStrategy.topology.values) || self.shardingStrategy.topology.values.size() == 0 || (has(self.shards) ? self.shards : 1) \u003e= self.shardingStrategy.topology.values.size()"}]
object

status defines the most recent observed status of the Prometheus cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status