Skip to content

Commit

Permalink
[kube-state-metrics] add option to add initContainers and additional …
Browse files Browse the repository at this point in the history
…sidecars
  • Loading branch information
chrischdi committed Oct 4, 2023
1 parent 57c9e02 commit fa111f3
Show file tree
Hide file tree
Showing 3 changed files with 18 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: 5.13.0
version: 5.14.0
appVersion: 2.10.0
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
7 changes: 7 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
{{- $httpPort := ternary 9090 (.Values.service.port | default 8080) .Values.kubeRBACProxy.enabled}}
{{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}}
Expand Down Expand Up @@ -240,6 +244,9 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.containers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- include "kube-state-metrics.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.imagePullSecrets) | indent 8 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,13 @@ extraManifests: []
# name: prometheus-extra
# data:
# extra-data: "value"

## Containers allows injecting additional containers.
containers: []
# - name: crd-init
# image: kiwigrid/k8s-sidecar:latest

## InitContainers allows injecting additional initContainers.
initContainers: []
# - name: crd-sidecar
# image: kiwigrid/k8s-sidecar:latest

Check failure on line 454 in charts/kube-state-metrics/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

454:41 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit fa111f3

Please sign in to comment.