Skip to content

Commit

Permalink
[kube-state-metrics] Enable configuring kubernetes annotation metrics (
Browse files Browse the repository at this point in the history
…#1362)

* Enable configuring kubernetes annotation metrics

With kubernetes/kube-state-metrics#1468 kube-state-metrics v2.2.0 added the possibility to configure annotation metrics, similar to how label metrics are currently configured.
This change adds a configuration option for configuring annotation metrics to this helm chart.

Signed-off-by: Maximilian Bischoff <maximilian.bischoff@inovex.de>

* Bump chart version

Signed-off-by: Maximilian Bischoff <maximilian.bischoff@inovex.de>
  • Loading branch information
maxbischoff committed Sep 21, 2021
1 parent fff784c commit 5969b84
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- prometheus
- kubernetes
type: application
version: 3.5.0
version: 3.5.1
appVersion: 2.2.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ spec:
{{- if .Values.metricLabelsAllowlist }}
- --metric-labels-allowlist={{ .Values.metricLabelsAllowlist | join "," }}
{{- end }}
{{- if .Values.metricAnnotationsAllowList }}
- --metric-annotations-allowlist={{ .Values.metricAnnotationsAllowList | join "," }}
{{- end }}
{{- if .Values.metricAllowlist }}
- --metric-allowlist={{ .Values.metricAllowlist | join "," }}
{{- end }}
Expand Down
9 changes: 9 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ metricDenylist: []
metricLabelsAllowlist: []
# - namespaces=[k8s-label-1,k8s-label-n]

# Comma-separated list of Kubernetes annotations keys that will be used in the resource'
# labels metric. By default the metric contains only name and namespace labels.
# To include additional annotations provide a list of resource names in their plural form and Kubernetes
# annotation keys you would like to allow for them (Example: '=namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...)'.
# A single '*' can be provided per resource instead to allow any annotations, but that has
# severe performance implications (Example: '=pods=[*]').
metricAnnotationsAllowList: []
# - pods=[k8s-annotation-1,k8s-annotation-n]

# Available collectors for kube-state-metrics.
# By default, all available resources are enabled, comment out to disable.
collectors:
Expand Down

0 comments on commit 5969b84

Please sign in to comment.