Skip to content

Commit

Permalink
feat: run migration only on main cluster in mgmt-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallesm committed Jun 3, 2024
1 parent 8df49d5 commit b53cf71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/core/templates/mgmt-backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ spec:
- name: TEMPORAL_CLI_ADDRESS
value: "{{ template "core.temporal" . }}-frontend:{{ template "core.temporal.frontend.grpcPort" . }}"
{{- end }}
{{- if .Values.isPrimaryCluster }}
- name: mgmt-backend-migration
image: {{ .Values.mgmtBackend.image.repository }}:{{ .Values.mgmtBackend.image.tag }}
imagePullPolicy: {{ .Values.mgmtBackend.image.pullPolicy }}
Expand All @@ -91,6 +92,7 @@ spec:
{{- with .Values.mgmtBackend.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
- name: mgmt-backend-init
image: {{ .Values.mgmtBackend.image.repository }}:{{ .Values.mgmtBackend.image.tag }}
imagePullPolicy: {{ .Values.mgmtBackend.image.pullPolicy }}
Expand Down
2 changes: 2 additions & 0 deletions charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ updateStrategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
# -- Set the cluster as the primary one in a multi-region environment.
isPrimaryCluster: true
# -- Logging level: debug, info, warning, error or fatal
logLevel: info
# -- Enable development mode
Expand Down

0 comments on commit b53cf71

Please sign in to comment.