2 {{- if .Values.autosharding.enabled }}
8 name: {{ template "kube-state-metrics.fullname" . }}
9 namespace: {{ template "kube-state-metrics.namespace" . }}
11 app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
12 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
13 app.kubernetes.io/instance: "{{ .Release.Name }}"
14 app.kubernetes.io/managed-by: "{{ .Release.Service }}"
15 {{- if .Values.customLabels }}
16 {{ toYaml .Values.customLabels | indent 4 }}
21 app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
22 replicas: {{ .Values.replicas }}
23 {{- if .Values.autosharding.enabled }}
24 serviceName: {{ template "kube-state-metrics.fullname" . }}
25 volumeClaimTemplates: []
30 app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
31 app.kubernetes.io/instance: "{{ .Release.Name }}"
32 {{- if .Values.customLabels }}
33 {{ toYaml .Values.customLabels | indent 8 }}
35 {{- if .Values.podAnnotations }}
37 {{ toYaml .Values.podAnnotations | indent 8 }}
40 hostNetwork: {{ .Values.hostNetwork }}
41 serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}
42 {{- if .Values.securityContext.enabled }}
44 fsGroup: {{ .Values.securityContext.fsGroup }}
45 runAsUser: {{ .Values.securityContext.runAsUser }}
47 {{- if .Values.priorityClassName }}
48 priorityClassName: {{ .Values.priorityClassName }}
51 - name: {{ .Chart.Name }}
52 {{- if .Values.autosharding.enabled }}
57 fieldPath: metadata.name
61 fieldPath: metadata.namespace
64 {{ if .Values.collectors.certificatesigningrequests }}
65 - --collectors=certificatesigningrequests
67 {{ if .Values.collectors.configmaps }}
68 - --collectors=configmaps
70 {{ if .Values.collectors.cronjobs }}
71 - --collectors=cronjobs
73 {{ if .Values.collectors.daemonsets }}
74 - --collectors=daemonsets
76 {{ if .Values.collectors.deployments }}
77 - --collectors=deployments
79 {{ if .Values.collectors.endpoints }}
80 - --collectors=endpoints
82 {{ if .Values.collectors.horizontalpodautoscalers }}
83 - --collectors=horizontalpodautoscalers
85 {{ if .Values.collectors.ingresses }}
86 - --collectors=ingresses
88 {{ if .Values.collectors.jobs }}
91 {{ if .Values.collectors.limitranges }}
92 - --collectors=limitranges
94 {{ if .Values.collectors.mutatingwebhookconfigurations }}
95 - --collectors=mutatingwebhookconfigurations
97 {{ if .Values.collectors.namespaces }}
98 - --collectors=namespaces
100 {{ if .Values.collectors.networkpolicies }}
101 - --collectors=networkpolicies
103 {{ if .Values.collectors.nodes }}
106 {{ if .Values.collectors.persistentvolumeclaims }}
107 - --collectors=persistentvolumeclaims
109 {{ if .Values.collectors.persistentvolumes }}
110 - --collectors=persistentvolumes
112 {{ if .Values.collectors.poddisruptionbudgets }}
113 - --collectors=poddisruptionbudgets
115 {{ if .Values.collectors.pods }}
118 {{ if .Values.collectors.replicasets }}
119 - --collectors=replicasets
121 {{ if .Values.collectors.replicationcontrollers }}
122 - --collectors=replicationcontrollers
124 {{ if .Values.collectors.resourcequotas }}
125 - --collectors=resourcequotas
127 {{ if .Values.collectors.secrets }}
128 - --collectors=secrets
130 {{ if .Values.collectors.services }}
131 - --collectors=services
133 {{ if .Values.collectors.statefulsets }}
134 - --collectors=statefulsets
136 {{ if .Values.collectors.storageclasses }}
137 - --collectors=storageclasses
139 {{ if .Values.collectors.validatingwebhookconfigurations }}
140 - --collectors=validatingwebhookconfigurations
142 {{ if .Values.collectors.verticalpodautoscalers }}
143 - --collectors=verticalpodautoscalers
145 {{ if .Values.collectors.volumeattachments }}
146 - --collectors=volumeattachments
148 {{ if .Values.namespace }}
149 - --namespace={{ .Values.namespace }}
151 {{ if .Values.autosharding.enabled }}
153 - --pod-namespace=$(POD_NAMESPACE)
155 imagePullPolicy: {{ .Values.image.pullPolicy }}
156 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
158 - containerPort: 8080
163 initialDelaySeconds: 5
169 initialDelaySeconds: 5
171 {{- if .Values.resources }}
173 {{ toYaml .Values.resources | indent 10 }}
175 {{- if .Values.affinity }}
177 {{ toYaml .Values.affinity | indent 8 }}
179 {{- if .Values.nodeSelector }}
181 {{ toYaml .Values.nodeSelector | indent 8 }}
183 {{- if .Values.tolerations }}
185 {{ toYaml .Values.tolerations | indent 8 }}