prometheus operator v0.93.1

Alertmanager.spec.initContainers.securityContext.seLinuxOptions.spec

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

63 fields
Alertmanager.spec.initContainers.securityContext.seLinuxOptions.spec fields and descriptions
Field / TypeDescription
object[]

additionalArgs allows setting additional arguments for the 'Alertmanager' 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 Alertmanager container which may cause issues if they are invalid or not supported by the given Alertmanager version.

string[]

additionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster.

object

affinity defines the pod's scheduling constraints.

object

alertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects process incoming alerts.

object

alertmanagerConfigNamespaceSelector defines the namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace.

  • x-kubernetes-map-type: "atomic"
object

alertmanagerConfigSelector defines the selector to be used for to merge and configure Alertmanager with.

  • x-kubernetes-map-type: "atomic"
object

alertmanagerConfiguration defines the configuration of Alertmanager. If defined, it takes precedence over the `configSecret` field. This is an *experimental feature*, it may change in any upcoming release in a breaking way.

automountServiceAccountToken
boolean

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the service account has `automountServiceAccountToken: true`, set the field to `false` to opt out of automounting API credentials.

baseImage
string

baseImage that is used to deploy pods, without tag. Deprecated: use 'image' instead.

clusterAdvertiseAddress
string

clusterAdvertiseAddress defines the explicit address to advertise in cluster. Needs to be provided for non RFC1918 [1] (public) addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918

clusterGossipInterval
string

clusterGossipInterval defines the interval between gossip attempts.

  • pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
clusterLabel
string

clusterLabel defines the identifier that uniquely identifies the Alertmanager cluster. You should only set it when the Alertmanager cluster includes Alertmanager instances which are external to this Alertmanager resource. In practice, the addresses of the external instances are provided via the `.spec.additionalPeers` field.

clusterPeerTimeout
string

clusterPeerTimeout defines the timeout for cluster peering.

  • pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
clusterPushpullInterval
string

clusterPushpullInterval defines the interval between pushpull attempts.

  • pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
object

clusterTLS defines the mutual TLS configuration for the Alertmanager cluster's gossip protocol. It requires Alertmanager >= 0.24.0.

string[]

configMaps defines a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. The ConfigMaps are mounted into `/etc/alertmanager/configmaps/<configmap-name>` in the 'alertmanager' container.

configSecret
string

configSecret defines the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains the configuration for this Alertmanager instance. If empty, it defaults to `alertmanager-<alertmanager-name>`. The Alertmanager configuration should be available under the `alertmanager.yaml` key. Additional keys from the original secret are copied to the generated secret and mounted into the `/etc/alertmanager/config` directory in the `alertmanager` container. If either the secret or the `alertmanager.yaml` key is missing, the operator provisions a minimal Alertmanager configuration with one empty receiver (effectively dropping alert notifications).

object[]

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: * `alertmanager` * `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.

object

dnsConfig defines the DNS configuration for the pods.

dnsPolicy
string

dnsPolicy defines the DNS policy for the pods.

  • enum: ["ClusterFirstWithHostNet","ClusterFirst","Default","None"]
string[]

enableFeatures defines the Alertmanager's 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. It requires Alertmanager >= 0.27.0.

enableServiceLinks
boolean

enableServiceLinks defines whether information about services should be injected into pod's environment variables

externalUrl
string

externalUrl defines the URL used to access the Alertmanager web service. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name.

forceEnableClusterMode
boolean

forceEnableClusterMode ensures Alertmanager does not deactivate the cluster mode when running with a single replica. Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each.

object[]

hostAliases Pods configuration

  • x-kubernetes-list-map-keys: ["ip"]
  • x-kubernetes-list-type: "map"
hostNetwork
boolean

hostNetwork controls whether the pod may use the node network namespace. 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).

hostUsers
boolean

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.

image
string

image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Alertmanager is being configured.

imagePullPolicy
string

imagePullPolicy for the 'alertmanager', 'init-config-reloader' and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

  • enum: ["","Always","Never","IfNotPresent"]
object[]

imagePullSecrets An optional list of references to secrets in the same namespace to use for pulling prometheus and alertmanager images from registries see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

object[]

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.

object

limits defines the limits command line flags when starting Alertmanager.

listenLocal
boolean

listenLocal defines the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. Note this is only for the Alertmanager UI, not the gossip communication.

logFormat
string

logFormat for Alertmanager to be configured with.

  • enum: ["","logfmt","json"]
logLevel
string

logLevel for Alertmanager to be configured with.

  • enum: ["","debug","info","warn","error"]
minReadySeconds
integer

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. When the Alertmanager version is greater than or equal to v0.30.0, the duration is also used to delay the first flush of the aggregation groups. This delay helps ensuring that all alerts have been resent by the Prometheus instances to Alertmanager after a roll-out. It is possible to override this behavior passing a custom value via `.spec.additionalArgs`.

  • format: int32
  • minimum: 0
map[string]string

nodeSelector defines which Nodes the Pods are scheduled on.

paused
boolean

paused if set to true all actions on the underlying managed objects are not going to be performed, except for delete actions.

object

persistentVolumeClaimRetentionPolicy controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

podManagementPolicy
string

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.

  • enum: ["OrderedReady","Parallel"]
object

podMetadata defines labels and annotations which are propagated to the Alertmanager pods. The following items are reserved and cannot be overridden: * "alertmanager" label, set to the name of the Alertmanager instance. * "app.kubernetes.io/instance" label, set to the name of the Alertmanager instance. * "app.kubernetes.io/managed-by" label, set to "prometheus-operator". * "app.kubernetes.io/name" label, set to "alertmanager". * "app.kubernetes.io/version" label, set to the Alertmanager version. * "kubectl.kubernetes.io/default-container" annotation, set to "alertmanager".

portName
string

portName defines the port's name for the pods and governing service. Defaults to `web`.

  • default: "web"
priorityClassName
string

priorityClassName assigned to the Pods

replicas
integer

replicas defines the expected size of the alertmanager cluster. The controller will eventually make the size of the running cluster equal to the expected size.

  • format: int32
object

resources defines the resource requests and limits of the Pods.

retention
string

retention defines the time duration Alertmanager shall retain data for. Default is '120h', and must match the regular expression `[0-9]+(ms|s|m|h)` (milliseconds seconds minutes hours).

  • default: "120h"
  • pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
routePrefix
string

routePrefix Alertmanager registers HTTP handlers for. This is useful, if using 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`.

schedulerName
string

schedulerName defines the scheduler to use for Pod scheduling. If not specified, the default scheduler is used.

  • minLength: 1
string[]

secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. The Secrets are mounted into `/etc/alertmanager/secrets/<secret-name>` in the 'alertmanager' container.

object

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

serviceAccountName
string

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

serviceName
string

serviceName defines the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Alertmanager 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 `alertmanager-operated` for Alertmanager resources. When deploying multiple Alertmanager 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.

  • minLength: 1
sha
string

sha of Alertmanager container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set. Deprecated: use 'image' instead. The image digest can be specified as part of the image URL.

object

storage defines the definition of how storage will be used by the Alertmanager instances.

tag
string

tag of Alertmanager container image to be deployed. Defaults to the value of `version`. Version is ignored if Tag is set. Deprecated: use 'image' instead. The image tag can be specified as part of the image URL.

terminationGracePeriodSeconds
integer

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 120 seconds.

  • format: int64
  • minimum: 0
object[]

tolerations defines the pod's tolerations.

object[]

topologySpreadConstraints defines the Pod's topology spread constraints.

object

updateStrategy indicates the strategy that will be employed to update Pods in the StatefulSet when a revision is made to statefulset's Pod Template. The default strategy is RollingUpdate.

  • x-kubernetes-validations: [{"message":"rollingUpdate requires type to be RollingUpdate","rule":"!(self.type != 'RollingUpdate' \u0026\u0026 has(self.rollingUpdate))"}]
version
string

version the cluster should be on.

object[]

volumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, that are generated as a result of StorageSpec objects.

object[]

volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

object

web defines the web command line flags when starting Alertmanager.