From f5a9de69fc14d914470a68e1c7405ce7be79d22b Mon Sep 17 00:00:00 2001 From: Philipp Hossner Date: Wed, 21 Aug 2024 21:33:53 +0000 Subject: [PATCH] Set securityContext for haproxy init container --- haproxy-ingress/templates/_podtemplate.yaml | 4 ++++ haproxy-ingress/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/haproxy-ingress/templates/_podtemplate.yaml b/haproxy-ingress/templates/_podtemplate.yaml index ef62c72..eaac23c 100644 --- a/haproxy-ingress/templates/_podtemplate.yaml +++ b/haproxy-ingress/templates/_podtemplate.yaml @@ -39,6 +39,10 @@ spec: volumeMounts: - mountPath: /etc/haproxy name: etc +{{- if .Values.controller.haproxy.initContainer.securityContext }} + securityContext: + {{- toYaml .Values.controller.haproxy.initContainer.securityContext | nindent 8 }} +{{- end }} {{- end }} {{- if .Values.controller.initContainers }} {{- toYaml .Values.controller.initContainers | nindent 4 }} diff --git a/haproxy-ingress/values.yaml b/haproxy-ingress/values.yaml index 46f6746..ce162d6 100644 --- a/haproxy-ingress/values.yaml +++ b/haproxy-ingress/values.yaml @@ -365,6 +365,12 @@ controller: ## securityContext: {} + initContainer: + ## Container Security Context for the haproxy init container + ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## + securityContext: {} + stats: enabled: false port: 1936