From 8994506da10613efb8ace0639c7dcec7f6d3f4ec Mon Sep 17 00:00:00 2001 From: gw0 Date: Thu, 24 Jun 2021 16:22:31 +0200 Subject: [PATCH] Add configurable securityContext to gcloud-sqlproxy (#107) * Add configurable securityContext to gcloud-sqlproxy * Bump gcloud-sqlproxy chart version --- stable/gcloud-sqlproxy/Chart.yaml | 2 +- stable/gcloud-sqlproxy/README.md | 1 + stable/gcloud-sqlproxy/templates/deployment.yaml | 2 ++ stable/gcloud-sqlproxy/values.yaml | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stable/gcloud-sqlproxy/Chart.yaml b/stable/gcloud-sqlproxy/Chart.yaml index 91f9a28..34a5665 100755 --- a/stable/gcloud-sqlproxy/Chart.yaml +++ b/stable/gcloud-sqlproxy/Chart.yaml @@ -18,4 +18,4 @@ maintainers: name: gcloud-sqlproxy sources: - https://github.com/rimusz/charts -version: 0.20.4 +version: 0.20.5 diff --git a/stable/gcloud-sqlproxy/README.md b/stable/gcloud-sqlproxy/README.md index 84edb8f..1239dfe 100755 --- a/stable/gcloud-sqlproxy/README.md +++ b/stable/gcloud-sqlproxy/README.md @@ -93,6 +93,7 @@ The following table lists the configurable parameters of the `gcloud-sqlproxy` c | `networkPolicy.enabled` | Enable NetworkPolicy | `false` | | `networkPolicy.ingress.from` | List of sources which should be able to access the pods selected for this rule. If empty, allows all sources. | `[]` | | `extraArgs` | Additional container arguments | `{}` | +| `securityContext` | Configure Security Context | `{}` | | `livenessProbe.enabled` | Would you like a livenessProbe to be enabled | `false` | | `livenessProbe.port` | The port which will be checked by the probe | 5432 | | `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 30 | diff --git a/stable/gcloud-sqlproxy/templates/deployment.yaml b/stable/gcloud-sqlproxy/templates/deployment.yaml index 50c0530..8556c5e 100755 --- a/stable/gcloud-sqlproxy/templates/deployment.yaml +++ b/stable/gcloud-sqlproxy/templates/deployment.yaml @@ -32,6 +32,8 @@ spec: {{ toYaml .Values.podAnnotations | indent 8 }} spec: serviceAccountName: {{ template "gcloud-sqlproxy.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.securityContext | nindent 8 }} {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} diff --git a/stable/gcloud-sqlproxy/values.yaml b/stable/gcloud-sqlproxy/values.yaml index e6251ac..5cf51f3 100755 --- a/stable/gcloud-sqlproxy/values.yaml +++ b/stable/gcloud-sqlproxy/values.yaml @@ -147,6 +147,11 @@ terminationGracePeriodSeconds: 30 ## Pod annotations podAnnotations: {} +## Configure Security Context +securityContext: {} +# runAsUser: 1000 +# fsGroup: 1000 + ## Configure Pod Priority priorityClassName: ""