Skip to content

Commit

Permalink
feat: Add Helm configuration for pod security context
Browse files Browse the repository at this point in the history
  • Loading branch information
gonmmarques authored and yorugac committed Nov 5, 2024
1 parent 788a6f4 commit eea27e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion charts/k6-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ Kubernetes: `>=1.16.0-0`
| podLabels | object | `{}` | Custom Label to be applied on all pods |
| prometheus.enabled | bool | `false` | enables the prometheus metrics scraping (default: false) |
| tolerations | list | `[]` | Tolerations to be applied on all containers |

4 changes: 4 additions & 0 deletions charts/k6-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
{{- include "k6-operator.podAnnotations" . | default "" | nindent 8 }}
{{- end }}
spec:
{{- if .Values.global.podSecurityContext }}
securityContext:
{{- toYaml .Values.global.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- name: manager
image: "{{ .Values.global.image.registry | default .Values.manager.image.registry }}/{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}"
Expand Down
7 changes: 7 additions & 0 deletions charts/k6-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ global:
# global.image.pullSecrets -- Optional set of global image pull secrets
pullSecrets: []

# @schema
# required: false
# type: object
# @schema
# global.podSecurityContext -- A security context defines privileges and access control settings for a Pod
podSecurityContext: {}

# @schema
# additionalProperties: true
# required: false
Expand Down

0 comments on commit eea27e2

Please sign in to comment.