From 33903d8f6c085660c6b6d9fed2a0ee8c551abe85 Mon Sep 17 00:00:00 2001 From: martencassel Date: Mon, 1 Mar 2021 20:16:49 +0800 Subject: [PATCH] Add support to run gitea with an optional securityContext (#115) Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/115 Reviewed-by: luhahn Reviewed-by: lafriks Co-authored-by: martencassel Co-committed-by: martencassel --- README.md | 1 + templates/gitea/statefulset.yaml | 2 ++ values.yaml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 8ead328..68aec54 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ Annotations can be added to the Gitea pod. | extraVolumes | Additional volumes to mount to the Gitea statefulset | {} | | extraVolumeMounts | Additional volumes mounts for the Gitea containers | {} | | initPreScript | Bash script copied verbatim to start of init container | | +| securityContext | Run as a specific securityContext | {} | ### Image diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index 410eed8..13ee503 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -87,6 +87,8 @@ spec: failureThreshold: 3 resources: {{- toYaml .Values.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} volumeMounts: - name: data mountPath: /data diff --git a/values.yaml b/values.yaml index 574cafb..b739146 100644 --- a/values.yaml +++ b/values.yaml @@ -13,6 +13,8 @@ image: imagePullSecrets: [] +securityContext: {} + service: http: type: ClusterIP