Skip to content

Commit 812d618

Browse files
fix: update migration job labels so requests are not routed to them (#4143)
1 parent 23a8a31 commit 812d618

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

charts/camunda-platform-8.8/templates/orchestration/_helpers.tpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ app.kubernetes.io/component: zeebe-broker
2121
app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base" .Values.global "overlay" .Values.orchestration "chart" .Chart) | quote }}
2222
{{- end }}
2323

24+
{{/*
25+
[orchestration] Defines extra labels for orchestration.
26+
*/}}
27+
{{ define "orchestrationMigration.extraLabels" -}}
28+
{{- /* NOTE: The value is set to "zeebe-broker" for backward compatibility between 8.7 and 8.8. */ -}}
29+
app.kubernetes.io/component: orchestration-migration
30+
app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base" .Values.global "overlay" .Values.orchestration "chart" .Chart) | quote }}
31+
{{- end }}
32+
2433
{{/*
2534
[orchestration Importer] Defines extra labels for orchestration importer.
2635
*/}}
@@ -39,6 +48,15 @@ app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base
3948
{{- include "orchestration.extraLabels" . }}
4049
{{- end -}}
4150
51+
{{/*
52+
[orchestration] Define common labels for orchestration cluster migrations, combining the match labels and transient labels, which might change on updating
53+
(version depending). These labels shouldn't be used on matchLabels selector, since the selectors are immutable.
54+
*/}}
55+
{{- define "orchestrationMigration.labels" -}}
56+
{{- include "camundaPlatform.labels" . }}
57+
{{- "\n" }}
58+
{{- include "orchestrationMigration.extraLabels" . }}
59+
{{- end -}}
4260

4361
{{/*
4462
[orchestration Importer] Define common labels for orchestration importer, combining the match labels and transient labels, which might change on updating

charts/camunda-platform-8.8/templates/orchestration/migration-data-job.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ apiVersion: batch/v1
33
kind: Job
44
metadata:
55
name: {{ include "orchestration.fullname" . }}-data-migration
6-
labels: {{- include "orchestration.labels" . | nindent 4 }}
6+
labels: {{- include "orchestrationMigration.labels" . | nindent 4 }}
77
annotations: {{- toYaml .Values.global.annotations | nindent 4 }}
88
spec:
99
backoffLimit: {{ .Values.orchestration.migration.data.backoffLimit }}
1010
template:
1111
metadata:
1212
labels:
13-
{{- include "orchestration.labels" . | nindent 8 }}
13+
{{- include "orchestrationMigration.labels" . | nindent 8 }}
1414
annotations:
1515
checksum/config: {{ include (print $.Template.BasePath "/orchestration/migration-data-configmap.yaml") . | sha256sum }}
1616
spec:

charts/camunda-platform-8.8/templates/orchestration/migration-identity-job.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ apiVersion: batch/v1
33
kind: Job
44
metadata:
55
name: {{ include "identity.fullname" . }}-migration
6-
labels: {{- include "orchestration.labels" . | nindent 4 }}
6+
labels: {{- include "orchestrationMigration.labels" . | nindent 4 }}
77
annotations: {{- toYaml .Values.global.annotations | nindent 4 }}
88
spec:
99
backoffLimit: {{ .Values.orchestration.migration.identity.backoffLimit }}
1010
template:
1111
metadata:
1212
labels:
13-
{{- include "orchestration.labels" . | nindent 8 }}
13+
{{- include "orchestrationMigration.labels" . | nindent 8 }}
1414
annotations:
1515
checksum/config: {{ include (print $.Template.BasePath "/orchestration/migration-identity-configmap.yaml") . | sha256sum }}
1616
spec:

0 commit comments

Comments
 (0)