fix(helm): revert `app.kubernetes.io/part-of` as a selector (#5806)

Deployment selectors are immutable!
This commit is contained in:
Colin Adler 2023-01-19 23:31:05 -06:00 committed by GitHub
parent 546a8931aa
commit 8819f798f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -14,11 +14,12 @@ Create chart name and version as used by the chart label.
{{/* {{/*
Selector labels Selector labels
!!!!! DO NOT ADD ANY MORE SELECTORS. IT IS A BREAKING CHANGE !!!!!
*/}} */}}
{{- define "coder.selectorLabels" -}} {{- define "coder.selectorLabels" -}}
app.kubernetes.io/name: {{ include "coder.name" . }} app.kubernetes.io/name: {{ include "coder.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ include "coder.name" . }}
{{- end }} {{- end }}
{{/* {{/*
@ -27,6 +28,7 @@ Common labels
{{- define "coder.labels" -}} {{- define "coder.labels" -}}
helm.sh/chart: {{ include "coder.chart" . }} helm.sh/chart: {{ include "coder.chart" . }}
{{ include "coder.selectorLabels" . }} {{ include "coder.selectorLabels" . }}
app.kubernetes.io/part-of: {{ include "coder.name" . }}
{{- if .Chart.AppVersion }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }} {{- end }}

View File

@ -24,7 +24,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
{{- include "coder.selectorLabels" . | nindent 8 }} {{- include "coder.labels" . | nindent 8 }}
spec: spec:
serviceAccountName: coder serviceAccountName: coder
restartPolicy: Always restartPolicy: Always