Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Allow setting securityContext for every container (#46)
Browse files Browse the repository at this point in the history
* Allow setting securityContext for every container

* Update chart version
  • Loading branch information
rofafor authored Apr 15, 2022
1 parent 763df5a commit 664e6e7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion keydb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: keydb
description: A Helm chart for KeyDB multimaster setup
type: application
version: 0.33.4
version: 0.34.0
keywords:
- keydb
- redis
Expand Down
3 changes: 3 additions & 0 deletions keydb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ The following table lists the configurable parameters of the KeyDB chart and the
| `scripts.enabled` | Turn on health util scripts | `false` |
| `scripts.cleanupCoredumps` | Coredumps cleanup scripts | Look values.yaml |
| `scripts.cleanupTempfiles` | Tempfiles cleanup scripts | Look values.yaml |
| `scripts.securityContext` | SecurityContext for scripts container | `{}` |
| `keydb.securityContext` | SecurityContext for KeyDB container | `{}` |
| `securityContext` | SecurityContext for KeyDB pods | `{}` |
| `service.annotations` | Service annotations | `{}` |
| `loadBalancer.enabled` | Create LoadBalancer service | `false` |
Expand All @@ -129,6 +131,7 @@ The following table lists the configurable parameters of the KeyDB chart and the
| `exporter.readinessProbe` | ReadinessProbe for sidecar Prometheus exporter | Look values.yaml |
| `exporter.startupProbe` | StartupProbe for sidecar Prometheus exporter | Look values.yaml |
| `exporter.resources` | Resources for sidecar Prometheus container | `{}` |
| `exporter.securityContext` | SecurityContext for Prometheus exporter container | `{}` |
| `exporter.extraArgs` | Additional arguments for exporter | `[]` |

## Using existingSecret
Expand Down
6 changes: 6 additions & 0 deletions keydb/templates/sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.keydb.securityContext | nindent 10 }}
volumeMounts:
- name: health
mountPath: /health
Expand Down Expand Up @@ -173,6 +175,8 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.exporter.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.exporter.securityContext | nindent 10 }}
ports:
- name: redis-exporter
containerPort: {{ .Values.exporter.port }}
Expand All @@ -198,6 +202,8 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.scripts.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.scripts.securityContext | nindent 10 }}
volumeMounts:
- name: health
mountPath: /health
Expand Down
9 changes: 9 additions & 0 deletions keydb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ securityContext: {}
# - name: vm.overcommit_memory
# value: "1"

keydb:
# Container security context
securityContext: {}

service:
annotations: {}

Expand Down Expand Up @@ -212,6 +216,9 @@ exporter:
# CPU/Memory resource limits/requests
resources: {}

# Container security context
securityContext: {}

# Additional args for redis exporter
extraArgs: []
# - somesimple: "argument"
Expand All @@ -223,6 +230,8 @@ scripts:
enabled: false
# CPU/Memory resource limits/requests
resources: {}
# Container security context
securityContext: {}
cleanupCoredumps:
enabled: false
minutes: 1440
Expand Down

0 comments on commit 664e6e7

Please sign in to comment.