diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 1fd20976f470..2c6a181633bd 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.19.3 +version: 9.19.4 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index 2e152707bf21..c4ebd8b01379 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -364,6 +364,7 @@ Though enough for the majority of installations, the default PodSecurityPolicy _ | service.portName | string | `"http"` | Name for service port. | | service.servicePort | int | `8085` | Service port to expose. | | service.type | string | `"ClusterIP"` | Type of service to create. | +| serviceMonitor.annotations | object | `{}` | Annotations to add to service monitor | | serviceMonitor.enabled | bool | `false` | If true, creates a Prometheus Operator ServiceMonitor. | | serviceMonitor.interval | string | `"10s"` | Interval that Prometheus scrapes Cluster Autoscaler metrics. | | serviceMonitor.namespace | string | `"monitoring"` | Namespace which Prometheus is running in. | diff --git a/charts/cluster-autoscaler/templates/servicemonitor.yaml b/charts/cluster-autoscaler/templates/servicemonitor.yaml index be372397f604..35e0ba45ecf2 100644 --- a/charts/cluster-autoscaler/templates/servicemonitor.yaml +++ b/charts/cluster-autoscaler/templates/servicemonitor.yaml @@ -6,6 +6,8 @@ metadata: {{- if .Values.serviceMonitor.namespace }} namespace: {{ .Values.serviceMonitor.namespace }} {{- end }} + annotations: +{{ toYaml .Values.serviceMonitor.annotations | indent 4 }} labels: {{- range $key, $value := .Values.serviceMonitor.selector }} {{ $key }}: {{ $value | quote }} diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index c5bbcbe188ec..0801c745cfcc 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -342,6 +342,8 @@ serviceMonitor: release: prometheus-operator # serviceMonitor.path -- The path to scrape for metrics; autoscaler exposes `/metrics` (this is standard) path: /metrics + # serviceMonitor.annotations -- Annotations to add to service monitor + annotations: {} ## Custom PrometheusRule to be defined ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart