[stable/kube-state-metrics] add customLabels to service, deployment and pods (#15808)

Signed-off-by: Eriks Zelenka <isindir@users.sf.net>
This commit is contained in:
isindir
2019-07-24 17:31:51 -07:00
committed by Kubernetes Prow Robot
parent 0f032a47f4
commit df65ee1cfb
5 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ keywords:
- monitoring
- prometheus
- kubernetes
version: 2.1.0
version: 2.1.1
appVersion: 1.7.1
home: https://github.com/kubernetes/kube-state-metrics/
sources:
+1
View File
@@ -19,6 +19,7 @@ $ helm install stable/kube-state-metrics
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `replicas` | Number of replicas | `1` |
| `service.port` | The port of the container | `8080` |
| `customLabels` | Custom labels to apply to service, deployment and pods | `{}` |
| `hostNetwork` | Whether or not to use the host network | `false` |
| `prometheusScrape` | Whether or not enable prom scrape | `true` |
| `rbac.create` | If true, create & use RBAC resources | `true` |
@@ -7,6 +7,9 @@ metadata:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
@@ -17,6 +20,9 @@ spec:
labels:
app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
@@ -7,6 +7,9 @@ metadata:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels | indent 4 }}
{{- end }}
{{- if .Values.prometheusScrape }}
annotations:
prometheus.io/scrape: '{{ .Values.prometheusScrape }}'
+2
View File
@@ -14,6 +14,8 @@ service:
nodePort: 0
loadBalancerIP: ""
customLabels: {}
hostNetwork: false
rbac: