ThanosRuler [monitoring.coreos.com/v1]
- Description
- The
ThanosRulercustom resource definition (CRD) defines a desired Thanos Ruler setup to run in a Kubernetes cluster. AThanosRulerinstance requires at least one compatible Prometheus API endpoint (either Thanos Querier or Prometheus services). The resource defines via label and namespace selectors whichPrometheusRuleobjects should be associated to the deployed Thanos Ruler instances. - Type
-
`object`
- Required
-
spec
Specification
| Property | Type | Description |
|---|---|---|
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 | ObjectMeta | Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
spec | object | spec defines the specification of the desired behavior of the ThanosRuler cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status |
status | object | status defines the most recent observed status of the ThanosRuler cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status |
.spec
- Description
- spec defines the specification of the desired behavior of the ThanosRuler cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
additionalArgs | array | additionalArgs defines how to add additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument the reconciliation will fail and an error will be logged. |
additionalArgs[] | object | Argument as part of the AdditionalArgs list. |
affinity | object | affinity defines when specified, the pod’s scheduling constraints. |
alertDropLabels | array (string) | alertDropLabels defines the label names which should be dropped in Thanos Ruler alerts. The replica label thanos_ruler_replica will always be dropped from the alerts. |
alertQueryUrl | string | alertQueryUrl defines how Thanos Ruler will set in the 'Source' field of all alerts. Maps to the '--alert.query-url' CLI arg. |
alertRelabelConfigFile | string | alertRelabelConfigFile defines the path to the alert relabeling configuration file. Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs The operator performs no validation of the configuration file. This field takes precedence over alertRelabelConfig. |
alertRelabelConfigs | object | alertRelabelConfigs defines the alert relabeling in Thanos Ruler. Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs The operator performs no validation of the configuration. alertRelabelConfigFile takes precedence over this field. |
alertmanagersConfig | object | alertmanagersConfig defines the list of Alertmanager endpoints to send alerts to. The configuration format is defined at https://thanos.io/tip/components/rule.md/#alertmanager. It requires Thanos >= v0.10.0. The operator performs no validation of the configuration. This field takes precedence over alertmanagersUrl. |
alertmanagersUrl | array (string) | alertmanagersUrl defines the list of Alertmanager endpoints to send alerts to. For Thanos >= v0.10.0, it is recommended to use alertmanagersConfig instead.alertmanagersConfig takes precedence over this field. |
containers | array | 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: * thanos-ruler * config-reloaderOverriding containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator. |
containers[] | object | A single application container that you want to run within a pod. |
dnsConfig | object | dnsConfig defines Defines the DNS configuration for the pods. |
dnsPolicy | string | dnsPolicy defines the DNS policy for the pods. |
enableFeatures | array (string) | enableFeatures defines how to setup Thanos Ruler feature flags. By default, no features are enabled. Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice. For more information see https://thanos.io/tip/components/rule.md/ It requires Thanos >= 0.39.0. |
enableServiceLinks | boolean | enableServiceLinks defines whether information about services should be injected into pod’s environment variables |
enforcedNamespaceLabel | string | enforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created. |
evaluationInterval | string | evaluationInterval defines the interval between consecutive evaluations. |
excludedFromEnforcement | array | excludedFromEnforcement defines the list of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true. |
excludedFromEnforcement[] | object | ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object. |
externalPrefix | string | externalPrefix defines the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name. |
grpcServerTlsConfig | object | grpcServerTlsConfig defines the gRPC server from which Thanos Querier reads recorded rule data. Note: Currently only the minVersion, caFile, certFile, and keyFile fields are supported. |
hostAliases | array | hostAliases defines pods' hostAliases configuration |
hostAliases[] | object | HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
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 defines Thanos container image URL. |
imagePullPolicy | string | imagePullPolicy defines for the 'thanos', 'init-config-reloader' and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details. |
imagePullSecrets | array | imagePullSecrets defines an optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod |
imagePullSecrets[] | object | LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. |
initContainers | array | initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the 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[] | object | A single application container that you want to run within a pod. |
labels | object (string) | labels defines the external label pairs of the ThanosRuler resource. A default replica label thanos_ruler_replica will be always added as a label with the value of the pod’s name. |
listenLocal | boolean | listenLocal defines the Thanos ruler listen on loopback, so that it does not bind against the Pod IP. |
logFormat | string | logFormat for ThanosRuler to be configured with. |
logLevel | string | logLevel for ThanosRuler to be configured with. |
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. |
nodeSelector | object (string) | nodeSelector defines which Nodes the Pods are scheduled on. |
objectStorageConfig | object | objectStorageConfig defines the configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage The operator performs no validation of the configuration. objectStorageConfigFile takes precedence over this field. |
objectStorageConfigFile | string | objectStorageConfigFile defines the path of the object storage configuration file. The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage The operator performs no validation of the configuration file. This field takes precedence over objectStorageConfig. |
paused | boolean | paused defines when a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects. |
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. |
podMetadata | object | podMetadata defines labels and annotations which are propagated to the ThanosRuler pods. The following items are reserved and cannot be overridden: * "app.kubernetes.io/name" label, set to "thanos-ruler". * "app.kubernetes.io/managed-by" label, set to "prometheus-operator". * "app.kubernetes.io/instance" label, set to the name of the ThanosRuler instance. * "thanos-ruler" label, set to the name of the ThanosRuler instance. * "kubectl.kubernetes.io/default-container" annotation, set to "thanos-ruler". |
portName | string | portName defines the port name used for the pods and governing service. Defaults to web. |
priorityClassName | string | priorityClassName defines the priority class assigned to the Pods |
prometheusRulesExcludedFromEnforce | array | prometheusRulesExcludedFromEnforce defines a list of Prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair Deprecated: use excludedFromEnforcement instead. |
prometheusRulesExcludedFromEnforce[] | object | PrometheusRuleExcludeConfig enables users to configure excluded PrometheusRule names and their namespaces to be ignored while enforcing namespace label for alerts and metrics. |
queryConfig | object | queryConfig defines the list of Thanos Query endpoints from which to query metrics. The configuration format is defined at https://thanos.io/tip/components/rule.md/#query-api It requires Thanos >= v0.11.0. The operator performs no validation of the configuration. This field takes precedence over queryEndpoints. |
queryEndpoints | array (string) | queryEndpoints defines the list of Thanos Query endpoints from which to query metrics. For Thanos >= v0.11.0, it is recommended to use queryConfig instead.queryConfig takes precedence over this field. |
remoteWrite | array | remoteWrite defines the list of remote write configurations. When the list isn’t empty, the ruler is configured with stateless mode. It requires Thanos >= 0.24.0. |
remoteWrite[] | object | RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint. |
replicas | integer | replicas defines the number of thanos ruler instances to deploy. |
resendDelay | string | resendDelay defines the minimum amount of time to wait before resending an alert to Alertmanager. |
resources | object | resources defines the resource requirements for single Pods. If not provided, no requests/limits will be set |
retention | string | retention defines the time duration ThanosRuler shall retain data for. Default is '24h', and must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years).The field has no effect when remote-write is configured since the Ruler operates in stateless mode. |
routePrefix | string | routePrefix defines the route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path. |
ruleConcurrentEval | integer | ruleConcurrentEval defines how many rules can be evaluated concurrently. It requires Thanos >= v0.37.0. |
ruleGracePeriod | string | ruleGracePeriod defines the minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period. It requires Thanos >= v0.30.0. |
ruleNamespaceSelector | object | ruleNamespaceSelector defines the namespaces to be selected for Rules discovery. If unspecified, only the same namespace as the ThanosRuler object is in is used. |
ruleOutageTolerance | string | ruleOutageTolerance defines the max time to tolerate prometheus outage for restoring "for" state of alert. It requires Thanos >= v0.30.0. |
ruleQueryOffset | string | ruleQueryOffset defines the default rule group’s query offset duration to use. It requires Thanos >= v0.38.0. |
ruleSelector | object | ruleSelector defines the PrometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects. |
schedulerName | string | schedulerName defines the scheduler to use for Pod scheduling. If not specified, the default scheduler is used. |
securityContext | object | securityContext defines the pod-level security attributes and common container settings. This defaults to the default PodSecurityContext. |
serviceAccountName | string | serviceAccountName defines the name of the ServiceAccount to use to run the Thanos Ruler Pods. |
serviceName | string | 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 ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named thanos-ruler-operated for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details. |
storage | object | storage defines the specification of how storage shall be used. |
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. |
tolerations | array | tolerations defines when specified, the pod’s tolerations. |
tolerations[] | object | The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator |
topologySpreadConstraints | array | topologySpreadConstraints defines the pod’s topology spread constraints. |
topologySpreadConstraints[] | object | TopologySpreadConstraint specifies how to spread matching pods among the given topology. |
tracingConfig | object | tracingConfig defines the tracing configuration. The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration This is an experimental feature, it may change in any upcoming release in a breaking way. The operator performs no validation of the configuration. tracingConfigFile takes precedence over this field. |
tracingConfigFile | string | tracingConfigFile defines the path of the tracing configuration file. The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration This is an experimental feature, it may change in any upcoming release in a breaking way. The operator performs no validation of the configuration file. This field takes precedence over tracingConfig. |
updateStrategy | 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. |
version | string | version of Thanos to be deployed. |
volumeMounts | array | volumeMounts defines how the configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects. |
volumeMounts[] | object | VolumeMount describes a mounting of a Volume within a container. |
volumes | array | volumes defines how 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. |
volumes[] | object | Volume represents a named volume in a pod that may be accessed by any container in the pod. |
web | object | web defines the configuration of the ThanosRuler web server. |
.spec.additionalArgs
- Description
- additionalArgs defines how to add additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument the reconciliation will fail and an error will be logged.
- Type
-
`array`
.spec.additionalArgs[]
- Description
- Argument as part of the AdditionalArgs list.
- Type
-
`object`
- Required
-
name
| Property | Type | Description |
|---|---|---|
name | string | name of the argument, e.g. "scrape.discovery-reload-interval". |
value | string | value defines the argument value, e.g. 30s. Can be empty for name-only arguments (e.g. --storage.tsdb.no-lockfile) |
.spec.affinity
- Description
- affinity defines when specified, the pod’s scheduling constraints.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
nodeAffinity | object | Describes node affinity scheduling rules for the pod. |
podAffinity | object | Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). |
podAntiAffinity | object | Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). |
.spec.affinity.nodeAffinity
- Description
- Describes node affinity scheduling rules for the pod.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
preferredDuringSchedulingIgnoredDuringExecution | array | The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. |
preferredDuringSchedulingIgnoredDuringExecution[] | object | An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it’s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). |
requiredDuringSchedulingIgnoredDuringExecution | object | If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. |
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution
- Description
- The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
- Type
-
`array`
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[]
- Description
- An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it’s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
- Type
-
`object`
- Required
-
preferenceweight
| Property | Type | Description |
|---|---|---|
preference | object | A node selector term, associated with the corresponding weight. |
weight | integer | Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. |
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[].preference
- Description
- A node selector term, associated with the corresponding weight.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
matchExpressions | array | A list of node selector requirements by node’s labels. |
matchExpressions[] | object | A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
matchFields | array | A list of node selector requirements by node’s fields. |
matchFields[] | object | A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[].preference.matchExpressions
- Description
- A list of node selector requirements by node’s labels.
- Type
-
`array`
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[].preference.matchExpressions[]
- Description
- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | The label key that the selector applies to. |
operator | string | Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. |
values | array (string) | An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. |
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[].preference.matchFields
- Description
- A list of node selector requirements by node’s fields.
- Type
-
`array`
.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[].preference.matchFields[]
- Description
- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | The label key that the selector applies to. |
operator | string | Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. |
values | array (string) | An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. |
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution
- Description
- If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
- Type
-
`object`
- Required
-
nodeSelectorTerms
| Property | Type | Description |
|---|---|---|
nodeSelectorTerms | array | Required. A list of node selector terms. The terms are ORed. |
nodeSelectorTerms[] | object | A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. |
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms
- Description
- Required. A list of node selector terms. The terms are ORed.
- Type
-
`array`
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[]
- Description
- A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
matchExpressions | array | A list of node selector requirements by node’s labels. |
matchExpressions[] | object | A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
matchFields | array | A list of node selector requirements by node’s fields. |
matchFields[] | object | A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[].matchExpressions
- Description
- A list of node selector requirements by node’s labels.
- Type
-
`array`
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[].matchExpressions[]
- Description
- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | The label key that the selector applies to. |
operator | string | Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. |
values | array (string) | An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. |
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[].matchFields
- Description
- A list of node selector requirements by node’s fields.
- Type
-
`array`
.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[].matchFields[]
- Description
- A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | The label key that the selector applies to. |
operator | string | Represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. |
values | array (string) | An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. |
.spec.affinity.podAffinity
- Description
- Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
preferredDuringSchedulingIgnoredDuringExecution | array | The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. |
preferredDuringSchedulingIgnoredDuringExecution[] | object | The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) |
requiredDuringSchedulingIgnoredDuringExecution | array | If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. |
requiredDuringSchedulingIgnoredDuringExecution[] | object | Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution
- Description
- The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
- Type
-
`array`
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[]
- Description
- The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
- Type
-
`object`
- Required
-
podAffinityTermweight
| Property | Type | Description |
|---|---|---|
podAffinityTerm | object | Required. A pod affinity term, associated with the corresponding weight. |
weight | integer | weight associated with matching the corresponding podAffinityTerm, in the range 1-100. |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm
- Description
- Required. A pod affinity term, associated with the corresponding weight.
- Type
-
`object`
- Required
-
topologyKey
| Property | Type | Description |
|---|---|---|
labelSelector | object | A label query over a set of resources, in this case pods. If it’s null, this PodAffinityTerm matches with no Pods. |
matchLabelKeys | array (string) | MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key in (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn’t set. |
mismatchLabelKeys | array (string) | MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with labelSelector as key notin (value) to select the group of existing pods which pods will be taken into consideration for the incoming pod’s pod (anti) affinity. Keys that don’t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn’t set. |
namespaceSelector | object | A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod’s namespace". An empty selector ({}) matches all namespaces. |
namespaces | array (string) | namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod’s namespace". |
topologyKey | string | This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.labelSelector
- Description
- A label query over a set of resources, in this case pods. If it’s null, this PodAffinityTerm matches with no Pods.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
matchExpressions | array | matchExpressions is a list of label selector requirements. The requirements are ANDed. |
matchExpressions[] | object | A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
matchLabels | object (string) | matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.labelSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
`array`
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.labelSelector.matchExpressions[]
- Description
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | key is the label key that the selector applies to. |
operator | string | operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
values | array (string) | values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.namespaceSelector
- Description
- A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod’s namespace". An empty selector ({}) matches all namespaces.
- Type
-
`object`
| Property | Type | Description |
|---|---|---|
matchExpressions | array | matchExpressions is a list of label selector requirements. The requirements are ANDed. |
matchExpressions[] | object | A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
matchLabels | object (string) | matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
`array`
.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[].podAffinityTerm.namespaceSelector.matchExpressions[]
- Description
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
`object`
- Required
-
keyoperator
| Property | Type | Description |
|---|---|---|
key | string | key is the label key that the selector applies to. |
operator | string | operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
values | array (string) | values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |