Support additonal labels and all Kubernetes recommanded labels (#7186)

* Add: Kubernetes recommanded labels

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Add: support additional labels

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Add: commonLabels default value

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
This commit is contained in:
Nicolas Lamirault 2022-01-16 23:29:28 +01:00 committed by GitHub
parent 0bc01f7c35
commit 3732681588
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -88,7 +88,11 @@ helm.sh/chart: {{ include "ingress-nginx.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/part-of: {{ template "ingress-nginx.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels}}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end -}}
{{/*

View file

@ -7,6 +7,12 @@
# nameOverride:
# fullnameOverride:
## Labels to apply to all resources
##
commonLabels: {}
# scmhash: abc123
# myLabel: aakkmd
controller:
name: controller
image: