Skip to content

Commit 7aec0db

Browse files
committed
refactor: run orchestration from unified config
1 parent f03158b commit 7aec0db

File tree

6 files changed

+272
-408
lines changed

6 files changed

+272
-408
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,22 @@ app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base
125125

126126
{{- define "orchestration.enabledProfiles" -}}
127127
{{- $enabledProfiles := list -}}
128-
{{- range $k, $v := .Values.orchestration.profiles }}
129-
{{- if eq $v true }}
130-
{{- $enabledProfiles = append $enabledProfiles $k }}
131-
{{- end }}
128+
{{- range $key, $value := .Values.orchestration.profiles }}
129+
{{- if eq $value true }}
130+
{{- $enabledProfiles = append $enabledProfiles $key }}
131+
{{- end }}
132132
{{- end }}
133133
{{- join "," $enabledProfiles }}
134134
{{- end -}}
135135

136+
{{- define "orchestration.enabledProfilesWithIdentity" -}}
137+
{{- if or (eq .Values.orchestration.security.authentication.method "oidc") (eq .Values.orchestration.security.authentication.method "basic") }}
138+
{{- printf "%s,%s" (include "orchestration.enabledProfiles" .) "consolidated-auth" -}}
139+
{{- else }}
140+
{{- include "orchestration.enabledProfiles" . | replace "identity" "auth" -}}
141+
{{- end }}
142+
{{- end -}}
143+
136144
{{- define "orchestration.secondaryStorage" -}}
137145
{{- if .Values.global.noSecondaryStorage -}}
138146
none

charts/camunda-platform-8.8/templates/orchestration/configmap-unified.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ apiVersion: v1
88
data:
99
startup.sh: |
1010
# The Node ID depends on the StatefulSet Pod's name so it cannot be templated in the StatefulSet level.
11-
# The value of "node-id" is calculated in the "startup.sh" file and exported as "VALUES_NODE_ID" env var.
12-
export VALUES_NODE_ID="${VALUES_NODE_ID:-$[${K8S_NAME##*-} * {{.Values.global.multiregion.regions}} + {{.Values.global.multiregion.regionId}}]}"
13-
echo "export VALUES_NODE_ID=${VALUES_NODE_ID}"
11+
# The value of "node-id" is calculated in the "startup.sh" file and exported as "VALUES_ORCHESTRATION_NODE_ID" env var.
12+
export VALUES_ORCHESTRATION_NODE_ID="${VALUES_ORCHESTRATION_NODE_ID:-$[${K8S_NAME##*-} * {{.Values.global.multiregion.regions}} + {{.Values.global.multiregion.regionId}}]}"
13+
echo "export VALUES_ORCHESTRATION_NODE_ID=${VALUES_ORCHESTRATION_NODE_ID}"
1414
1515
if [ "${ZEEBE_RESTORE}" = "true" ]; then
1616
exec /usr/local/camunda/bin/restore --backupId=${ZEEBE_RESTORE_FROM_BACKUP_ID}

0 commit comments

Comments
 (0)