fix: #404 - Set Security Context for Redis Pod

This commit is contained in:
Frederik Weber 2020-07-14 11:58:55 +02:00 committed by Frederik Weber
parent bc78e3cbe1
commit 93f593c7b9
3 changed files with 7 additions and 6 deletions

View file

@ -311,6 +311,7 @@ through `xxx.extraArgs`
| redis.podLabels | Labels for the Redis server pods | `{}` | | redis.podLabels | Labels for the Redis server pods | `{}` |
| redis.priorityClassName | Priority class for redis | `""` | | redis.priorityClassName | Priority class for redis | `""` |
| redis.resources | Resource limits and requests 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.servicePort | Redis service port | `6379` |
| redis.tolerations | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | | 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 | | | 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 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
automountServiceAccountToken: false automountServiceAccountToken: false
{{- if .Values.global.securityContext }} {{- if .Values.redis.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} securityContext: {{- toYaml .Values.redis.securityContext | nindent 8 }}
{{- end }} {{- end }}
containers: containers:
- name: {{ template "argo-cd.redis.fullname" . }} - name: {{ template "argo-cd.redis.fullname" . }}

View file

@ -272,10 +272,10 @@ redis:
priorityClassName: "" priorityClassName: ""
## Labels to set container specific security contexts ## Labels to set container specific security contexts
containerSecurityContext: {} securityContext:
# capabilities: runAsUser: 1000
# drop: fsGroup: 1000
# - all runAsNonRoot: true
resources: {} resources: {}