Skip to content

Commit 9b108ba

Browse files
committed
fix: adjust openshift helper
1 parent 9a4621c commit 9b108ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

charts/camunda-platform-8.8/templates/z/1/2/3/4/5/6/7/8/z_compatibility_helpers.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,13 @@ Also, recent OpenShift versions (> 4.10) have adjusted the virtual memory of the
465465
OpenShift.
466466
The label `tuned.openshift.io/elasticsearch` is added to ensure compatibility with the previous Camunda Helm charts.
467467
Without this label, the Helm upgrade will fail for OpenShift because it is already set for the volumeClaimTemplate.
468+
This is only needed when elasticsearch is actually enabled and deployed.
468469
*/}}
469470

470-
{{- if eq .Values.global.compatibility.openshift.adaptSecurityContext "force" -}}
471+
{{- if and (eq .Values.global.compatibility.openshift.adaptSecurityContext "force") .Values.elasticsearch.enabled -}}
472+
{{- if not (hasKey .Values.elasticsearch "commonLabels") -}}
473+
{{- $_ := set .Values.elasticsearch "commonLabels" (dict) -}}
474+
{{- end -}}
471475
{{- if not (hasKey .Values.elasticsearch.commonLabels "tuned.openshift.io/elasticsearch") -}}
472476
{{- $_ := set .Values.elasticsearch.commonLabels "tuned.openshift.io/elasticsearch" "" -}}
473477
{{- end -}}

0 commit comments

Comments
 (0)