Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Helm configuration for container security context #411

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion charts/k6-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Kubernetes: `>=1.16.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity to be applied on all containers |
| authProxy.containerSecurityContext | object | `{}` | A security context defines privileges and access control settings for the container. |
| authProxy.enabled | bool | `true` | enables the protection of /metrics endpoint. (https://github.com/brancz/kube-rbac-proxy) |
| authProxy.image.pullPolicy | string | `"IfNotPresent"` | pull policy for the image can be Always, Never, IfNotPresent (default: IfNotPresent) |
| authProxy.image.registry | string | `"gcr.io"` | |
Expand All @@ -38,6 +39,7 @@ Kubernetes: `>=1.16.0-0`
| 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, ...) |
| 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 |
| manager.image.pullPolicy | string | `"IfNotPresent"` | pull policy for the image possible values Always, Never, IfNotPresent (default: IfNotPresent) |
| manager.image.registry | string | `"ghcr.io"` | |
Expand All @@ -60,4 +62,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.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
8 changes: 8 additions & 0 deletions charts/k6-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ spec:
ports:
- containerPort: 8443
name: https
{{- if .Values.authProxy.containerSecurityContext }}
securityContext:
{{- toYaml .Values.authProxy.containerSecurityContext | nindent 12 }}
{{- end }}
{{- end }}
- name: manager
image: "{{ .Values.global.image.registry | default .Values.manager.image.registry }}/{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}"
Expand All @@ -68,6 +72,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- if .Values.manager.containerSecurityContext }}
securityContext:
{{- toYaml .Values.manager.containerSecurityContext | nindent 12 }}
{{- end }}
command:
- /manager
args:
Expand Down
4 changes: 4 additions & 0 deletions charts/k6-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ authProxy:
livenessProbe: {}
# authProxy.readinessProbe -- Readiness probe in Probe format
readinessProbe: {}
# authProxy.containerSecurityContext -- A security context defines privileges and access control settings for the container.
containerSecurityContext: {}

manager:
# manager.replicas -- number of controller-manager replicas (default: 1)
Expand Down Expand Up @@ -88,3 +90,5 @@ manager:
cpu: 100m
# manager.resources.requests.memory -- controller-manager Memory request (Min)
memory: 50Mi
# manager.containerSecurityContext -- A security context defines privileges and access control settings for the container.
containerSecurityContext: {}