From f7792d52d73ee7a314e9f05bf885d51340bf61b0 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 28 Apr 2024 16:29:05 +0900 Subject: [PATCH] =?UTF-8?q?refactor(cronjob-template):=20security=20contex?= =?UTF-8?q?t=20=EC=84=A4=EC=A0=95=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/cronjob-template/Chart.yaml | 2 +- charts/cronjob-template/templates/cron-job.yaml | 4 ++++ charts/cronjob-template/values.yaml | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/cronjob-template/Chart.yaml b/charts/cronjob-template/Chart.yaml index de593c3..8da6dbe 100644 --- a/charts/cronjob-template/Chart.yaml +++ b/charts/cronjob-template/Chart.yaml @@ -9,4 +9,4 @@ maintainers: - name: modusign url: https://github.com/modusign name: cronjob-template -version: 1.1.1 +version: 1.2.0 diff --git a/charts/cronjob-template/templates/cron-job.yaml b/charts/cronjob-template/templates/cron-job.yaml index 6a57ccc..ca877da 100644 --- a/charts/cronjob-template/templates/cron-job.yaml +++ b/charts/cronjob-template/templates/cron-job.yaml @@ -123,6 +123,10 @@ spec: lifecycle: {{- toYaml . | nindent 14 }} {{- end }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 14 }} + {{- end }} {{- with .Values.initContainers }} initContainers: {{- tpl (toYaml .) $ | nindent 10 }} diff --git a/charts/cronjob-template/values.yaml b/charts/cronjob-template/values.yaml index ac2f20c..4c4d3f4 100644 --- a/charts/cronjob-template/values.yaml +++ b/charts/cronjob-template/values.yaml @@ -119,6 +119,9 @@ observability: # -- Specify postStart and preStop lifecycle hooks for your container lifecycle: {} +# -- Security context for container +securityContext: {} + # -- Resource limits and requests for the server resources: requests: