diff --git a/charts/kube-state-metrics/templates/deployment.yaml b/charts/kube-state-metrics/templates/deployment.yaml index 29a74b80d441..01a9b5b28625 100644 --- a/charts/kube-state-metrics/templates/deployment.yaml +++ b/charts/kube-state-metrics/templates/deployment.yaml @@ -66,7 +66,18 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {{- if .Values.env }} + {{- toYaml .Values.env | nindent 8 }} {{- end }} + + {{ else }} + {{- if .Values.env }} + env: + {{- toYaml .Values.env | nindent 8 }} + {{- end }} + + {{- end }} + args: {{- if .Values.extraArgs }} {{- .Values.extraArgs | toYaml | nindent 8 }} diff --git a/charts/kube-state-metrics/values.yaml b/charts/kube-state-metrics/values.yaml index ddfdd22fd6b4..948eb587269a 100644 --- a/charts/kube-state-metrics/values.yaml +++ b/charts/kube-state-metrics/values.yaml @@ -160,6 +160,13 @@ serviceAccount: # If false then the user will opt out of automounting API credentials. automountServiceAccountToken: true +# Additional Environment variables +env: {} + # - name: GOMAXPROCS + # valueFrom: + # resourceFieldRef: + # resource: limits.cpu + prometheus: monitor: enabled: false