Skip to content

Commit ccc6d91

Browse files
authored
refactor: run orchestration cluster from unified config (#4138)
1 parent 35f1e16 commit ccc6d91

33 files changed

+792
-2143
lines changed

.github/workflows/test-local-template.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ jobs:
5555
kubectl
5656
make
5757
task
58-
- name: Debug failed asdf
59-
if: failure()
60-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
58+
- name: CI Setup - Set test type vars
59+
uses: ./.github/actions/test-type-vars
6160
with:
62-
path: /home/runner/.asdf/downloads/make/4.3
63-
name: install.log
64-
if-no-files-found: error
61+
chart-dir: "${{ inputs.camunda-helm-dir }}"
62+
values-enterprise: false
63+
values-digest: true
6564
- name: Create KIND cluster
6665
run: |
6766
kind create cluster --name camunda-platform-local
@@ -79,13 +78,16 @@ jobs:
7978
run: |
8079
make helm.repos-add
8180
helm package --dependency-update "charts/${{ inputs.camunda-helm-dir }}"
82-
- name: Install Camunda Helm chart
81+
- name: Install Camunda Helm chart
8382
timeout-minutes: 10
8483
run: |
84+
test -n "${{ env.TEST_HELM_DIGEST_VALUES }}" &&
85+
TEST_HELM_EXTRA_ARGS="--values charts/${{ inputs.camunda-helm-dir }}/values-digest.yaml"
8586
helm install camunda-platform *.tgz --wait --timeout 10m0s \
8687
--namespace ${{ env.TEST_NAMESPACE }} \
8788
--values "charts/${{ inputs.camunda-helm-dir }}/test/integration/scenarios/common/values-integration-test-pull-secrets.yaml" \
88-
--values "charts/${{ inputs.camunda-helm-dir }}/values-local.yaml"
89+
--values "charts/${{ inputs.camunda-helm-dir }}/values-local.yaml" \
90+
${TEST_HELM_EXTRA_ARGS}
8991
- name: Get Pods
9092
if: failure()
9193
run: |

charts/camunda-platform-8.8/templates/NOTES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767

6868
The Cluster itself is not exposed as a service which means that you can use `kubectl port-forward` to access the Zeebe cluster from outside Kubernetes:
6969

70-
> kubectl port-forward svc/{{ include "orchestration.fullname" . }}-gateway 26500:26500 -n {{ .Release.Namespace }}
71-
> kubectl port-forward svc/{{ include "orchestration.fullname" . }}-gateway 8088:8080 -n {{ .Release.Namespace }}
70+
> kubectl port-forward svc/{{ include "orchestration.serviceNameGateway" . }} 26500:26500 -n {{ .Release.Namespace }}
71+
> kubectl port-forward svc/{{ include "orchestration.serviceNameGateway" . }} 8088:8080 -n {{ .Release.Namespace }}
7272

7373
Now you can connect your workers and clients to `localhost:26500` for gRPC or `localhost:26500` for REST API usage.
7474

charts/camunda-platform-8.8/templates/common/ingress-grpc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
pathType: {{ .Values.orchestration.ingress.grpc.pathType }}
3131
backend:
3232
service:
33-
name: {{ include "orchestration.fullname" . }}-gateway
33+
name: {{ include "orchestration.serviceNameGateway" . }}
3434
port:
3535
number: {{ .Values.orchestration.service.grpcPort }}
3636
{{- if .Values.orchestration.ingress.grpc.tls.enabled }}

charts/camunda-platform-8.8/templates/common/ingress-http.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ spec:
7676
# Orchestration.
7777
- backend:
7878
service:
79-
name: {{ template "orchestration.fullname" . }}-gateway
79+
name: {{ include "orchestration.serviceNameGateway" . }}
8080
port:
8181
number: {{ .Values.orchestration.service.httpPort }}
8282
path: {{ .Values.orchestration.contextPath }}

charts/camunda-platform-8.8/templates/connectors/configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ data:
3636
3737
camunda:
3838
client:
39-
{{- $baseURLInternal := printf "%s://%s-gateway"
39+
{{- $baseURLInternal := printf "%s://%s"
4040
(lower .Values.orchestration.readinessProbe.scheme)
41-
(include "orchestration.fullname" .)
41+
(include "orchestration.serviceNameGateway" .)
4242
}}
4343
rest-address: {{ printf "%s:%v%s"
4444
$baseURLInternal

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

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base
127127
128128
129129
{{/*
130-
[web-modeler] Define variables related to authentication.
130+
[orchestration] Define variables related to authentication.
131131
*/}}
132132
{{- define "orchestration.authClientId" -}}
133133
{{- .Values.global.identity.auth.orchestration.clientId | default "orchestration" -}}
@@ -143,14 +143,22 @@ app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base
143143
144144
{{- define "orchestration.enabledProfiles" -}}
145145
{{- $enabledProfiles := list -}}
146-
{{- range $k, $v := .Values.orchestration.profiles }}
147-
{{- if eq $v true }}
148-
{{- $enabledProfiles = append $enabledProfiles $k }}
149-
{{- end }}
146+
{{- range $key, $value := .Values.orchestration.profiles }}
147+
{{- if eq $value true }}
148+
{{- $enabledProfiles = append $enabledProfiles $key }}
149+
{{- end }}
150150
{{- end }}
151151
{{- join "," $enabledProfiles }}
152152
{{- end -}}
153153
154+
{{- define "orchestration.enabledProfilesWithIdentity" -}}
155+
{{- if or (eq .Values.orchestration.security.authentication.method "oidc") (eq .Values.orchestration.security.authentication.method "basic") }}
156+
{{- printf "%s,%s" (include "orchestration.enabledProfiles" .) "consolidated-auth" -}}
157+
{{- else }}
158+
{{- include "orchestration.enabledProfiles" . | replace "identity" "auth" -}}
159+
{{- end }}
160+
{{- end -}}
161+
154162
{{- define "orchestration.secondaryStorage" -}}
155163
{{- if .Values.global.noSecondaryStorage -}}
156164
none
@@ -166,3 +174,45 @@ app.kubernetes.io/version: {{ include "camundaPlatform.versionLabel" (dict "base
166174
{{- define "orchestration.persistentSessionsEnabled" -}}
167175
{{- not .Values.global.noSecondaryStorage -}}
168176
{{- end -}}
177+
178+
179+
{{/*
180+
********************************************************************************
181+
Service names.
182+
********************************************************************************
183+
*/}}
184+
185+
{{/*
186+
[orchestration] Define Orchestration Cluster service - Broker.
187+
*/}}
188+
{{- define "orchestration.serviceNameBroker" }}
189+
{{- include "orchestration.fullname" . -}}
190+
{{- end -}}
191+
192+
{{/*
193+
[orchestration] Define Orchestration Cluster service - Gateway.
194+
*/}}
195+
{{- define "orchestration.serviceNameGateway" }}
196+
{{- include "orchestration.fullname" . -}}-gateway
197+
{{- end -}}
198+
199+
{{/*
200+
[orchestration] Define Orchestration Cluster service - Broker - gRPC.
201+
*/}}
202+
{{- define "orchestration.serviceNameBrokerGRPC" }}
203+
{{- include "orchestration.serviceNameBroker" . -}}:{{ .Values.orchestration.service.grpcPort }}
204+
{{- end -}}
205+
206+
{{/*
207+
[orchestration] Define Orchestration Cluster service - Gateway - gRPC.
208+
*/}}
209+
{{- define "orchestration.serviceNameGatewayGRPC" }}
210+
{{- include "orchestration.serviceNameGateway" . -}}:{{ .Values.orchestration.service.grpcPort }}
211+
{{- end -}}
212+
213+
{{/*
214+
[orchestration] Define Orchestration Cluster service - Gateway - REST.
215+
*/}}
216+
{{- define "orchestration.serviceNameGatewayREST" }}
217+
{{- include "orchestration.serviceNameGateway" . -}}:{{ .Values.orchestration.service.restPort }}
218+
{{- end -}}

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)