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 committed Oct 2, 2024
1 parent 5b84331 commit 8bd589c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charts/k6-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Kubernetes: `>=1.16.0-0`
| customLabels | object | `{}` | Custom Label to be applied on all resources |
| global.image.pullSecrets | list | `[]` | Optional set of global image pull secrets |
| global.image.registry | string | `""` | Global image registry to use if it needs to be overridden for some specific use cases (e.g local registries, custom images, ...) |
| global.podSecurityContext | object | `{}` | A security context defines privileges and access control settings for a Pod |
| installCRDs | bool | `true` | Installs CRDs as part of the release |
| manager.containerSecurityContext | object | `{}` | A security context defines privileges and access control settings for the container. |
| manager.env | object | `{}` | Environment variables to be applied on the controller |
Expand All @@ -63,4 +64,4 @@ Kubernetes: `>=1.16.0-0`
| tolerations | object | `{}` | Tolerations to be applied on all containers |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
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 @@ -14,6 +14,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
# required: false
# type: object
Expand Down

0 comments on commit 8bd589c

Please sign in to comment.