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

Add support for priorityClass and containerSecurityContext #83 #84

Merged
merged 1 commit into from
Mar 4, 2022
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: 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