1 From 3f950814b953c6806100404f5e43bd16ce86f6fd Mon Sep 17 00:00:00 2001
2 From: John Kung <john.kung@windriver.com>
3 Date: Fri, 18 Oct 2019 17:01:14 -0400
4 Subject: [PATCH 1/1] Update kube-state-metrics 1.8.0, to commit 09daf19
7 stable/kube-state-metrics/Chart.yaml | 7 +-
8 stable/kube-state-metrics/OWNERS | 8 ++
9 stable/kube-state-metrics/README.md | 96 ++++++++++++----------
10 stable/kube-state-metrics/templates/NOTES.txt | 2 +-
11 .../kube-state-metrics/templates/clusterrole.yaml | 38 +++++++--
12 .../templates/clusterrolebinding.yaml | 8 +-
13 .../kube-state-metrics/templates/deployment.yaml | 52 +++++++++---
14 .../templates/podsecuritypolicy.yaml | 10 +--
15 .../templates/psp-clusterrole.yaml | 8 +-
16 .../templates/psp-clusterrolebinding.yaml | 8 +-
17 stable/kube-state-metrics/templates/service.yaml | 22 +++--
18 .../templates/serviceaccount.yaml | 10 +--
19 .../templates/servicemonitor.yaml | 24 ++++++
20 stable/kube-state-metrics/values.yaml | 24 +++++-
21 14 files changed, 220 insertions(+), 97 deletions(-)
22 create mode 100644 stable/kube-state-metrics/OWNERS
23 create mode 100644 stable/kube-state-metrics/templates/servicemonitor.yaml
25 diff --git a/stable/kube-state-metrics/Chart.yaml b/stable/kube-state-metrics/Chart.yaml
26 index 2f0f39d..283e1ac 100644
27 --- a/stable/kube-state-metrics/Chart.yaml
28 +++ b/stable/kube-state-metrics/Chart.yaml
29 @@ -5,11 +5,14 @@ keywords:
38 home: https://github.com/kubernetes/kube-state-metrics/
40 - https://github.com/kubernetes/kube-state-metrics/
43 email: jose@armesto.net
45 + email: tariq.ibrahim@mulesoft.com
46 diff --git a/stable/kube-state-metrics/OWNERS b/stable/kube-state-metrics/OWNERS
48 index 0000000..6ffd97d
50 +++ b/stable/kube-state-metrics/OWNERS
60 diff --git a/stable/kube-state-metrics/README.md b/stable/kube-state-metrics/README.md
61 index 94ad049..6c7f364 100644
62 --- a/stable/kube-state-metrics/README.md
63 +++ b/stable/kube-state-metrics/README.md
64 @@ -12,45 +12,57 @@ $ helm install stable/kube-state-metrics
68 -| Parameter | Description | Default |
69 -|---------------------------------------|---------------------------------------------------------|---------------------------------------------|
70 -| `image.repository` | The image repository to pull from | k8s.gcr.io/kube-state-metrics |
71 -| `image.tag` | The image tag to pull from | `v1.5.0` |
72 -| `image.pullPolicy` | Image pull policy | IfNotPresent |
73 -| `replicas` | Number of replicas | 1 |
74 -| `service.port` | The port of the container | 8080 |
75 -| `prometheusScrape` | Whether or not enable prom scrape | true |
76 -| `rbac.create` | If true, create & use RBAC resources | true |
77 -| `serviceAccount.create` | If true, and rbac true, create & use serviceAccount | true |
78 -| `serviceAccount.name` | If not set & create is true, use template fullname | |
79 -| `serviceAccount.imagePullSecrets` | Specify image pull secrets field | `[]` |
80 -| `podSecurityPolicy.enabled` | If true, create & use PodSecurityPolicy resources | false |
81 -| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | {} |
82 -| `securityContext.enabled` | Enable security context | `true` |
83 -| `securityContext.fsGroup` | Group ID for the container | `65534` |
84 -| `securityContext.runAsUser` | User ID for the container | `65534` |
85 -| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
86 -| `nodeSelector` | Node labels for pod assignment | {} |
87 -| `tolerations` | Tolerations for pod assignment | [] |
88 -| `podAnnotations` | Annotations to be added to the pod | {} |
89 -| `resources` | kube-state-metrics resource requests and limits | {} |
90 -| `collectors.configmaps` | Enable the configmaps collector. | true |
91 -| `collectors.cronjobs` | Enable the cronjobs collector. | true |
92 -| `collectors.daemonsets` | Enable the daemonsets collector. | true |
93 -| `collectors.deployments` | Enable the deployments collector. | true |
94 -| `collectors.endpoints` | Enable the endpoints collector. | true |
95 -| `collectors.horizontalpodautoscalers` | Enable the horizontalpodautoscalers collector. | true |
96 -| `collectors.jobs` | Enable the jobs collector. | true |
97 -| `collectors.limitranges` | Enable the limitranges collector. | true |
98 -| `collectors.namespaces` | Enable the namespaces collector. | true |
99 -| `collectors.nodes` | Enable the nodes collector. | true |
100 -| `collectors.persistentvolumeclaims` | Enable the persistentvolumeclaims collector. | true |
101 -| `collectors.persistentvolumes` | Enable the persistentvolumes collector. | true |
102 -| `collectors.poddisruptionbudgets` | Enable the poddisruptionbudgets collector. | true |
103 -| `collectors.pods` | Enable the pods collector. | true |
104 -| `collectors.replicasets` | Enable the replicasets collector. | true |
105 -| `collectors.replicationcontrollers` | Enable the replicationcontrollers collector. | true |
106 -| `collectors.resourcequotas` | Enable the resourcequotas collector. | true |
107 -| `collectors.secrets` | Enable the secrets collector. | true |
108 -| `collectors.services` | Enable the services collector. | true |
109 -| `collectors.statefulsets` | Enable the statefulsets collector. | true |
110 +| Parameter | Description | Default |
111 +|:----------------------------------------|:--------------------------------------------------------------------------------------|:-------------------------------------------|
112 +| `image.repository` | The image repository to pull from | quay.io/coreos/kube-state-metrics |
113 +| `image.tag` | The image tag to pull from | `v1.8.0` |
114 +| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
115 +| `replicas` | Number of replicas | `1` |
116 +| `service.port` | The port of the container | `8080` |
117 +| `service.annotations` | Annotations to be added to the service | `{}`
118 +| `customLabels` | Custom labels to apply to service, deployment and pods | `{}` |
119 +| `hostNetwork` | Whether or not to use the host network | `false` |
120 +| `prometheusScrape` | Whether or not enable prom scrape | `true` |
121 +| `rbac.create` | If true, create & use RBAC resources | `true` |
122 +| `serviceAccount.create` | If true, create & use serviceAccount | `true` |
123 +| `serviceAccount.name` | If not set & create is true, use template fullname | |
124 +| `serviceAccount.imagePullSecrets` | Specify image pull secrets field | `[]` |
125 +| `podSecurityPolicy.enabled` | If true, create & use PodSecurityPolicy resources | `false` |
126 +| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | {} |
127 +| `securityContext.enabled` | Enable security context | `true` |
128 +| `securityContext.fsGroup` | Group ID for the container | `65534` |
129 +| `securityContext.runAsUser` | User ID for the container | `65534` |
130 +| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
131 +| `nodeSelector` | Node labels for pod assignment | {} |
132 +| `affinity` | Affinity settings for pod assignment | {} |
133 +| `tolerations` | Tolerations for pod assignment | [] |
134 +| `podAnnotations` | Annotations to be added to the pod | {} |
135 +| `resources` | kube-state-metrics resource requests and limits | {} |
136 +| `collectors.certificatesigningrequests` | Enable the certificatesigningrequests collector. | `true` |
137 +| `collectors.configmaps` | Enable the configmaps collector. | `true` |
138 +| `collectors.cronjobs` | Enable the cronjobs collector. | `true` |
139 +| `collectors.daemonsets` | Enable the daemonsets collector. | `true` |
140 +| `collectors.deployments` | Enable the deployments collector. | `true` |
141 +| `collectors.endpoints` | Enable the endpoints collector. | `true` |
142 +| `collectors.horizontalpodautoscalers` | Enable the horizontalpodautoscalers collector. | `true` |
143 +| `collectors.ingresses` | Enable the ingresses collector. | `true` |
144 +| `collectors.jobs` | Enable the jobs collector. | `true` |
145 +| `collectors.limitranges` | Enable the limitranges collector. | `true` |
146 +| `collectors.namespaces` | Enable the namespaces collector. | `true` |
147 +| `collectors.nodes` | Enable the nodes collector. | `true` |
148 +| `collectors.persistentvolumeclaims` | Enable the persistentvolumeclaims collector. | `true` |
149 +| `collectors.persistentvolumes` | Enable the persistentvolumes collector. | `true` |
150 +| `collectors.poddisruptionbudgets` | Enable the poddisruptionbudgets collector. | `true` |
151 +| `collectors.pods` | Enable the pods collector. | `true` |
152 +| `collectors.replicasets` | Enable the replicasets collector. | `true` |
153 +| `collectors.replicationcontrollers` | Enable the replicationcontrollers collector. | `true` |
154 +| `collectors.resourcequotas` | Enable the resourcequotas collector. | `true` |
155 +| `collectors.secrets` | Enable the secrets collector. | `true` |
156 +| `collectors.services` | Enable the services collector. | `true` |
157 +| `collectors.statefulsets` | Enable the statefulsets collector. | `true` |
158 +| `collectors.storageclasses` | Enable the storageclasses collector. | `true` |
159 +| `collectors.verticalpodautoscalers` | Enable the verticalpodautoscalers collector. | `false` |
160 +| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
161 +| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
162 +| `prometheus.monitor.namespace` | Namespace where servicemonitor resource should be created | `the same namespace as kube-state-metrics` |
163 +| `prometheus.monitor.honorLabels` | Honor metric labels | `false` |
164 diff --git a/stable/kube-state-metrics/templates/NOTES.txt b/stable/kube-state-metrics/templates/NOTES.txt
165 index 8e8d9fe..d804011 100644
166 --- a/stable/kube-state-metrics/templates/NOTES.txt
167 +++ b/stable/kube-state-metrics/templates/NOTES.txt
169 kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
170 The exposed metrics can be found here:
171 -https://github.com/kubernetes/kube-state-metrics/tree/master/Documentation#documentation.
172 +https://github.com/kubernetes/kube-state-metrics/blob/master/docs/README.md#exposed-metrics
174 The metrics are exported on the HTTP endpoint /metrics on the listening port.
175 In your case, {{ template "kube-state-metrics.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}/metrics
176 diff --git a/stable/kube-state-metrics/templates/clusterrole.yaml b/stable/kube-state-metrics/templates/clusterrole.yaml
177 index 803b73b..4f68a1f 100644
178 --- a/stable/kube-state-metrics/templates/clusterrole.yaml
179 +++ b/stable/kube-state-metrics/templates/clusterrole.yaml
180 @@ -3,12 +3,18 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
184 - app: {{ template "kube-state-metrics.name" . }}
185 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
186 - heritage: {{ .Release.Service }}
187 - release: {{ .Release.Name }}
188 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
189 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
190 + app.kubernetes.io/managed-by: {{ .Release.Service }}
191 + app.kubernetes.io/instance: {{ .Release.Name }}
192 name: {{ template "kube-state-metrics.fullname" . }}
194 +{{ if .Values.collectors.certificatesigningrequests }}
195 +- apiGroups: ["certificates.k8s.io"]
197 + - certificatesigningrequests
198 + verbs: ["list", "watch"]
200 {{ if .Values.collectors.configmaps }}
203 @@ -22,13 +28,13 @@ rules:
204 verbs: ["list", "watch"]
206 {{ if .Values.collectors.daemonsets }}
207 -- apiGroups: ["extensions"]
208 +- apiGroups: ["extensions", "apps"]
211 verbs: ["list", "watch"]
213 {{ if .Values.collectors.deployments }}
214 -- apiGroups: ["extensions"]
215 +- apiGroups: ["extensions", "apps"]
218 verbs: ["list", "watch"]
219 @@ -45,6 +51,12 @@ rules:
220 - horizontalpodautoscalers
221 verbs: ["list", "watch"]
223 +{{ if .Values.collectors.ingresses }}
224 +- apiGroups: ["extensions", "networking.k8s.io"]
227 + verbs: ["list", "watch"]
229 {{ if .Values.collectors.jobs }}
230 - apiGroups: ["batch"]
232 @@ -94,7 +106,7 @@ rules:
233 verbs: ["list", "watch"]
235 {{ if .Values.collectors.replicasets }}
236 -- apiGroups: ["extensions"]
237 +- apiGroups: ["extensions", "apps"]
240 verbs: ["list", "watch"]
241 @@ -129,4 +141,16 @@ rules:
243 verbs: ["list", "watch"]
245 +{{ if .Values.collectors.storageclasses }}
246 +- apiGroups: ["storage.k8s.io"]
249 + verbs: ["list", "watch"]
251 +{{ if .Values.collectors.verticalpodautoscalers }}
252 +- apiGroups: ["autoscaling.k8s.io"]
254 + - verticalpodautoscalers
255 + verbs: ["list", "watch"]
258 diff --git a/stable/kube-state-metrics/templates/clusterrolebinding.yaml b/stable/kube-state-metrics/templates/clusterrolebinding.yaml
259 index e57b051..b4586fb 100644
260 --- a/stable/kube-state-metrics/templates/clusterrolebinding.yaml
261 +++ b/stable/kube-state-metrics/templates/clusterrolebinding.yaml
262 @@ -3,10 +3,10 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
263 kind: ClusterRoleBinding
266 - app: {{ template "kube-state-metrics.name" . }}
267 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
268 - heritage: {{ .Release.Service }}
269 - release: {{ .Release.Name }}
270 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
271 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
272 + app.kubernetes.io/managed-by: {{ .Release.Service }}
273 + app.kubernetes.io/instance: {{ .Release.Name }}
274 name: {{ template "kube-state-metrics.fullname" . }}
276 apiGroup: rbac.authorization.k8s.io
277 diff --git a/stable/kube-state-metrics/templates/deployment.yaml b/stable/kube-state-metrics/templates/deployment.yaml
278 index ce02f8e..492df24 100644
279 --- a/stable/kube-state-metrics/templates/deployment.yaml
280 +++ b/stable/kube-state-metrics/templates/deployment.yaml
281 @@ -3,28 +3,33 @@ kind: Deployment
283 name: {{ template "kube-state-metrics.fullname" . }}
285 - app: {{ template "kube-state-metrics.name" . }}
286 - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
287 - release: "{{ .Release.Name }}"
288 - heritage: "{{ .Release.Service }}"
289 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
290 + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
291 + app.kubernetes.io/instance: "{{ .Release.Name }}"
292 + app.kubernetes.io/managed-by: "{{ .Release.Service }}"
293 +{{- if .Values.customLabels }}
294 +{{ toYaml .Values.customLabels | indent 4 }}
299 - app: {{ template "kube-state-metrics.name" . }}
300 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
301 replicas: {{ .Values.replicas }}
305 - app: {{ template "kube-state-metrics.name" . }}
306 - release: "{{ .Release.Name }}"
307 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
308 + app.kubernetes.io/instance: "{{ .Release.Name }}"
309 +{{- if .Values.customLabels }}
310 +{{ toYaml .Values.customLabels | indent 8 }}
312 {{- if .Values.podAnnotations }}
314 {{ toYaml .Values.podAnnotations | indent 8 }}
317 -{{ if .Values.rbac.create }}
318 + hostNetwork: {{ .Values.hostNetwork }}
319 serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}
321 {{- if .Values.securityContext.enabled }}
323 fsGroup: {{ .Values.securityContext.fsGroup }}
324 @@ -36,6 +41,9 @@ spec:
326 - name: {{ .Chart.Name }}
328 +{{ if .Values.collectors.certificatesigningrequests }}
329 + - --collectors=certificatesigningrequests
331 {{ if .Values.collectors.configmaps }}
332 - --collectors=configmaps
334 @@ -54,6 +62,9 @@ spec:
335 {{ if .Values.collectors.horizontalpodautoscalers }}
336 - --collectors=horizontalpodautoscalers
338 +{{ if .Values.collectors.ingresses }}
339 + - --collectors=ingresses
341 {{ if .Values.collectors.jobs }}
344 @@ -96,6 +107,12 @@ spec:
345 {{ if .Values.collectors.statefulsets }}
346 - --collectors=statefulsets
348 +{{ if .Values.collectors.storageclasses }}
349 + - --collectors=storageclasses
351 +{{ if .Values.collectors.verticalpodautoscalers }}
352 + - --collectors=verticalpodautoscalers
354 {{ if .Values.namespace }}
355 - --namespace={{ .Values.namespace }}
357 @@ -103,14 +120,26 @@ spec:
358 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
360 - containerPort: 8080
366 initialDelaySeconds: 5
372 + initialDelaySeconds: 5
374 +{{- if .Values.resources }}
376 -{{ toYaml .Values.resources | indent 12 }}
377 +{{ toYaml .Values.resources | indent 10 }}
379 +{{- if .Values.affinity }}
381 +{{ toYaml .Values.affinity | indent 8 }}
383 {{- if .Values.nodeSelector }}
385 {{ toYaml .Values.nodeSelector | indent 8 }}
386 @@ -119,4 +148,3 @@ spec:
388 {{ toYaml .Values.tolerations | indent 8 }}
391 diff --git a/stable/kube-state-metrics/templates/podsecuritypolicy.yaml b/stable/kube-state-metrics/templates/podsecuritypolicy.yaml
392 index 4ca46ac..aeff117 100644
393 --- a/stable/kube-state-metrics/templates/podsecuritypolicy.yaml
394 +++ b/stable/kube-state-metrics/templates/podsecuritypolicy.yaml
395 @@ -4,12 +4,12 @@ kind: PodSecurityPolicy
397 name: {{ template "kube-state-metrics.fullname" . }}
399 - app: {{ template "kube-state-metrics.name" . }}
400 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
401 - heritage: {{ .Release.Service }}
402 - release: {{ .Release.Name }}
404 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
405 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
406 + app.kubernetes.io/managed-by: {{ .Release.Service }}
407 + app.kubernetes.io/instance: {{ .Release.Name }}
408 {{- if .Values.podSecurityPolicy.annotations }}
410 {{ toYaml .Values.podSecurityPolicy.annotations | indent 4 }}
413 diff --git a/stable/kube-state-metrics/templates/psp-clusterrole.yaml b/stable/kube-state-metrics/templates/psp-clusterrole.yaml
414 index c43f90d..dcd65e1 100644
415 --- a/stable/kube-state-metrics/templates/psp-clusterrole.yaml
416 +++ b/stable/kube-state-metrics/templates/psp-clusterrole.yaml
417 @@ -3,10 +3,10 @@ apiVersion: rbac.authorization.k8s.io/v1
421 - app: {{ template "kube-state-metrics.name" . }}
422 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
423 - heritage: {{ .Release.Service }}
424 - release: {{ .Release.Name }}
425 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
426 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
427 + app.kubernetes.io/managed-by: {{ .Release.Service }}
428 + app.kubernetes.io/instance: {{ .Release.Name }}
429 name: psp-{{ template "kube-state-metrics.fullname" . }}
431 - apiGroups: ['extensions']
432 diff --git a/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml b/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml
433 index bfca12c..7418618 100644
434 --- a/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml
435 +++ b/stable/kube-state-metrics/templates/psp-clusterrolebinding.yaml
436 @@ -3,10 +3,10 @@ apiVersion: rbac.authorization.k8s.io/v1
437 kind: ClusterRoleBinding
440 - app: {{ template "kube-state-metrics.name" . }}
441 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
442 - heritage: {{ .Release.Service }}
443 - release: {{ .Release.Name }}
444 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
445 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
446 + app.kubernetes.io/managed-by: {{ .Release.Service }}
447 + app.kubernetes.io/instance: {{ .Release.Name }}
448 name: psp-{{ template "kube-state-metrics.fullname" . }}
450 apiGroup: rbac.authorization.k8s.io
451 diff --git a/stable/kube-state-metrics/templates/service.yaml b/stable/kube-state-metrics/templates/service.yaml
452 index b6daacd..a880bf9 100644
453 --- a/stable/kube-state-metrics/templates/service.yaml
454 +++ b/stable/kube-state-metrics/templates/service.yaml
455 @@ -3,14 +3,20 @@ kind: Service
457 name: {{ template "kube-state-metrics.fullname" . }}
459 - app: {{ template "kube-state-metrics.name" . }}
460 - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
461 - release: "{{ .Release.Name }}"
462 - heritage: "{{ .Release.Service }}"
463 - {{- if .Values.prometheusScrape }}
464 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
465 + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
466 + app.kubernetes.io/instance: "{{ .Release.Name }}"
467 + app.kubernetes.io/managed-by: "{{ .Release.Service }}"
468 +{{- if .Values.customLabels }}
469 +{{ toYaml .Values.customLabels | indent 4 }}
472 + {{- if .Values.prometheusScrape }}
473 prometheus.io/scrape: '{{ .Values.prometheusScrape }}'
476 + {{- if .Values.service.annotations }}
477 + {{- toYaml .Values.service.annotations | nindent 4 }}
480 type: "{{ .Values.service.type }}"
482 @@ -25,5 +31,5 @@ spec:
483 loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
486 - app: {{ template "kube-state-metrics.name" . }}
487 - release: {{ .Release.Name }}
488 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
489 + app.kubernetes.io/instance: {{ .Release.Name }}
490 diff --git a/stable/kube-state-metrics/templates/serviceaccount.yaml b/stable/kube-state-metrics/templates/serviceaccount.yaml
491 index edac3b9..e2bf7c0 100644
492 --- a/stable/kube-state-metrics/templates/serviceaccount.yaml
493 +++ b/stable/kube-state-metrics/templates/serviceaccount.yaml
495 -{{- if .Values.rbac.create -}}
496 {{- if .Values.serviceAccount.create -}}
501 - app: {{ template "kube-state-metrics.name" . }}
502 - chart: {{ .Chart.Name }}-{{ .Chart.Version }}
503 - heritage: {{ .Release.Service }}
504 - release: {{ .Release.Name }}
505 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
506 + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
507 + app.kubernetes.io/managed-by: {{ .Release.Service }}
508 + app.kubernetes.io/instance: {{ .Release.Name }}
509 name: {{ template "kube-state-metrics.fullname" . }}
511 {{ toYaml .Values.serviceAccount.imagePullSecrets | indent 2 }}
514 diff --git a/stable/kube-state-metrics/templates/servicemonitor.yaml b/stable/kube-state-metrics/templates/servicemonitor.yaml
516 index 0000000..6405bd4
518 +++ b/stable/kube-state-metrics/templates/servicemonitor.yaml
520 +{{- if .Values.prometheus.monitor.enabled }}
521 +apiVersion: monitoring.coreos.com/v1
522 +kind: ServiceMonitor
524 + name: {{ template "kube-state-metrics.fullname" . }}
526 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
527 + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
528 + app.kubernetes.io/instance: "{{ .Release.Name }}"
529 + app.kubernetes.io/managed-by: "{{ .Release.Service }}"
530 + {{- if .Values.prometheus.monitor.additionalLabels }}
531 +{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
536 + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
537 + app.kubernetes.io/instance: {{ .Release.Name }}
540 + {{- if .Values.prometheus.monitor.honorLabels }}
544 diff --git a/stable/kube-state-metrics/values.yaml b/stable/kube-state-metrics/values.yaml
545 index 86aab9b..2bf5b30 100644
546 --- a/stable/kube-state-metrics/values.yaml
547 +++ b/stable/kube-state-metrics/values.yaml
549 # Default values for kube-state-metrics.
550 prometheusScrape: true
552 - repository: k8s.gcr.io/kube-state-metrics
554 + repository: quay.io/coreos/kube-state-metrics
556 pullPolicy: IfNotPresent
559 @@ -13,6 +13,11 @@ service:
570 # If true, create & use RBAC resources
571 @@ -28,6 +33,13 @@ serviceAccount:
572 # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
578 + additionalLabels: {}
582 ## Specify if a Pod Security Policy for kube-state-metrics must be created
583 ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
585 @@ -53,6 +65,10 @@ securityContext:
586 ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
589 +## Affinity settings for pod assignment
590 +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
593 ## Tolerations for pod assignment
594 ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
596 @@ -66,12 +82,14 @@ podAnnotations: {}
597 # Available collectors for kube-state-metrics. By default all available
598 # collectors are enabled.
600 + certificatesigningrequests: true
606 horizontalpodautoscalers: true
611 @@ -86,6 +104,8 @@ collectors:
615 + storageclasses: true
616 + verticalpodautoscalers: false
618 # Namespace to be enabled for collecting resources. By default all namespaces are collected.