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: support securityContext and podSecurityContext configuration #265

Merged
merged 2 commits into from
Jul 8, 2024
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
2 changes: 2 additions & 0 deletions charts/pvc-autoresizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ helm upgrade --create-namespace --namespace pvc-autoresizer -i pvc-autoresizer -
| controller.nodeSelector | object | `{}` | Map of key-value pairs for scheduling pods on specific nodes. |
| controller.podAnnotations | object | `{}` | Annotations to be added to controller pods. |
| controller.podLabels | object | `{}` | Pod labels to be added to controller pods. |
| controller.podSecurityContext | object | `{}` | Security Context to be applied to the controller pods. |
| controller.replicas | int | `1` | Specify the number of replicas of the controller Pod. |
| controller.resources | object | `{"requests":{"cpu":"100m","memory":"20Mi"}}` | Specify resources. |
| controller.securityContext | object | `{}` | Security Context to be applied to the controller container within controller pods. |
| controller.terminationGracePeriodSeconds | string | `nil` | Specify terminationGracePeriodSeconds. |
| controller.tolerations | object | `{}` | Ensure pods are not scheduled on inappropriate nodes. |
| image.pullPolicy | string | `nil` | pvc-autoresizer image pullPolicy. |
Expand Down
4 changes: 4 additions & 0 deletions charts/pvc-autoresizer/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ spec:
volumeMounts:
- name: certs
mountPath: /certs
securityContext:
{{- toYaml .Values.controller.securityContext | nindent 12 }}
{{- with .Values.controller.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -83,3 +85,5 @@ spec:
secret:
defaultMode: 420
secretName: {{ template "pvc-autoresizer.fullname" . }}-controller
securityContext:
{{- toYaml .Values.controller.podSecurityContext | nindent 8 }}
15 changes: 15 additions & 0 deletions charts/pvc-autoresizer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ controller:
# controller.podAnnotations -- Annotations to be added to controller pods.
podAnnotations: {}

# controller.podSecurityContext -- Security Context to be applied to the controller pods.
podSecurityContext: {}

# controller.securityContext -- Security Context to be applied to the controller container within controller pods.
securityContext: {}
# allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# seccompProfile:
# type: RuntimeDefault

# controller.terminationGracePeriodSeconds -- Specify terminationGracePeriodSeconds.
terminationGracePeriodSeconds: # 10

Expand Down