Skip to content

Commit

Permalink
Add support for priorityClass and containerSecurityContext #83 (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshutoshNirkhe authored Mar 4, 2022
1 parent 9f1c509 commit 4282443
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/helm/kube-cleanup-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: kube-cleanup-operator
description: Kubernetes Operator to automatically delete completed Jobs and their Pods
type: application
version: 1.0.1
version: 1.0.2
appVersion: v0.8.1
keywords:
- kubernetes
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/kube-cleanup-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Kubernetes Operator to automatically delete completed Jobs and their Pods
| args[4] | string | `"--delete-evicted-pods-after=60m"` | |
| args[5] | string | `"--delete-orphaned-pods-after=60m"` | |
| args[6] | string | `"--legacy-mode=false"` | |
| containerSecurityContext | string | `nil` | |
| envVariables | list | `[]` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"quay.io/lwolf/kube-cleanup-operator"` | |
Expand All @@ -31,6 +32,7 @@ Kubernetes Operator to automatically delete completed Jobs and their Pods
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| priorityClassName | string | `nil` | |
| rbac.create | bool | `true` | |
| readinessProbe.failureThreshold | int | `3` | |
| readinessProbe.httpGet.path | string | `"/metrics"` | |
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/kube-cleanup-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ spec:
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -76,3 +79,6 @@ spec:
{{- with .Values.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end}}
11 changes: 11 additions & 0 deletions deploy/helm/kube-cleanup-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ affinity: {}
securityContext:
# runAsUser: 65534 # run as nobody user

# Security context settings at the container level
containerSecurityContext:
# runAsUser: 65534
# runAsNonRoot: true
# allowPrivilegeEscalation: false
# readOnlyRootFilesystem: true

# Existing Priority class name to be used for the pod
priorityClassName:
# addons-priority

serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
Expand Down

0 comments on commit 4282443

Please sign in to comment.