diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 8b96852f8d..05c02b15de 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -14,11 +14,12 @@ Create chart name and version as used by the chart label. {{/* Selector labels + +!!!!! DO NOT ADD ANY MORE SELECTORS. IT IS A BREAKING CHANGE !!!!! */}} {{- define "coder.selectorLabels" -}} app.kubernetes.io/name: {{ include "coder.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/part-of: {{ include "coder.name" . }} {{- end }} {{/* @@ -27,6 +28,7 @@ Common labels {{- define "coder.labels" -}} helm.sh/chart: {{ include "coder.chart" . }} {{ include "coder.selectorLabels" . }} +app.kubernetes.io/part-of: {{ include "coder.name" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} diff --git a/helm/templates/coder.yaml b/helm/templates/coder.yaml index fa4d16465e..43e70dd56b 100644 --- a/helm/templates/coder.yaml +++ b/helm/templates/coder.yaml @@ -24,7 +24,7 @@ spec: template: metadata: labels: - {{- include "coder.selectorLabels" . | nindent 8 }} + {{- include "coder.labels" . | nindent 8 }} spec: serviceAccountName: coder restartPolicy: Always