diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 4b5de007acc3..719b5271af39 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.20.1 +version: 9.21.0 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index dd199551b824..e7cc91bf33b9 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -370,6 +370,7 @@ Though enough for the majority of installations, the default PodSecurityPolicy _ | serviceMonitor.namespace | string | `"monitoring"` | Namespace which Prometheus is running in. | | serviceMonitor.path | string | `"/metrics"` | The path to scrape for metrics; autoscaler exposes `/metrics` (this is standard) | | serviceMonitor.selector | object | `{"release":"prometheus-operator"}` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install. | +| serviceMonitor.selector | obejct | `{}` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install. | | tolerations | list | `[]` | List of node taints to tolerate (requires Kubernetes >= 1.6). | -| topologySpreadConstraints | list | `[]` | You can use topology spread constraints to control how Pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains. (requires Kubernetes >= 1.19). | +| topologySpreadConstraints | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion. | | updateStrategy | object | `{}` | [Deployment update strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) | diff --git a/charts/cluster-autoscaler/templates/servicemonitor.yaml b/charts/cluster-autoscaler/templates/servicemonitor.yaml index 35e0ba45ecf2..5468756faf7a 100644 --- a/charts/cluster-autoscaler/templates/servicemonitor.yaml +++ b/charts/cluster-autoscaler/templates/servicemonitor.yaml @@ -20,6 +20,10 @@ spec: - port: {{ .Values.service.portName }} interval: {{ .Values.serviceMonitor.interval }} path: {{ .Values.serviceMonitor.path }} + {{- if .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.serviceMonitor.metricRelabelings | indent 6) . }} + {{- end }} namespaceSelector: matchNames: - {{.Release.Namespace}} diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index bb7bfb5fd1f5..1a4c1bcf3946 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -344,6 +344,9 @@ serviceMonitor: path: /metrics # serviceMonitor.annotations -- Annotations to add to service monitor annotations: {} + ## [RelabelConfig](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig) + # serviceMonitor.metricRelabelings -- MetricRelabelConfigs to apply to samples before ingestion. + metricRelabelings: {} ## Custom PrometheusRule to be defined ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart