From 360bac8ba4b036dd9b532656024b5fa85dfdb215 Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Thu, 14 Sep 2023 15:12:22 +0200 Subject: [PATCH] feat(helm): Remove Openshift security warning message --- helm/camel-k/templates/operator.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/helm/camel-k/templates/operator.yaml b/helm/camel-k/templates/operator.yaml index 6b2b274a81..961b7ed124 100644 --- a/helm/camel-k/templates/operator.yaml +++ b/helm/camel-k/templates/operator.yaml @@ -89,10 +89,21 @@ spec: resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Values.operator.securityContext }} {{- with .Values.operator.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} + {{- else if eq .Values.platform.cluster "OpenShift" }} + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + {{- end }} serviceAccountName: camel-k-operator {{- with .Values.operator.tolerations }} tolerations: