fix: #404 - Change Redis image to run as non-root user (#405)

* fix: #404 - Set Security Context for Redis Pod

* Separate Container and Pod Security Context for Redis

* Bump Chart Version

* Syntax fix

* Also set Group in Redis Security Context
pull/411/head
Frederik Weber 2020-07-15 19:18:47 +02:00 committed by GitHub
parent bc78e3cbe1
commit 9b80bd95e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.6.1"
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 2.5.3
version: 2.5.4
home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords:

View File

@ -311,6 +311,7 @@ through `xxx.extraArgs`
| redis.podLabels | Labels for the Redis server pods | `{}` |
| redis.priorityClassName | Priority class for redis | `""` |
| redis.resources | Resource limits and requests for redis | `{}` |
| redis.securityContext | Redis Pod Security Context | See [values.yaml](values.yaml) |
| redis.servicePort | Redis service port | `6379` |
| redis.tolerations | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` |
| redis-ha | Configures [Redis HA subchart](https://github.com/helm/charts/tree/master/stable/redis-ha) The properties below have been changed from the subchart defaults | |

View File

@ -41,8 +41,8 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
automountServiceAccountToken: false
{{- if .Values.global.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- if .Values.redis.securityContext }}
securityContext: {{- toYaml .Values.redis.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ template "argo-cd.redis.fullname" . }}

View File

@ -277,6 +277,12 @@ redis:
# drop:
# - all
## Redis Pod specific security context
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
runAsNonRoot: true
resources: {}
# limits: