8000 feat(helm): add podSecurityContext and podAnnotations to crdHook Job by qlevasseur-genetec · Pull Request #2009 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content
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 deploy/helm/clickhouse-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ crdHook:
| crdHook.image.tag | string | `"latest"` | image tag for CRD installation job |
| crdHook.imagePullSecrets | list | `[]` | image pull secrets for CRD installation job possible value format `[{"name":"your-secret-name"}]`, check `kubectl explain pod.spec.imagePullSecrets` for details |
| crdHook.nodeSelector | object | `{}` | node selector for CRD installation job |
| crdHook.podAnnotations | object | `{}` | additional annotations for CRD installation job pod template useful to opt out of service mesh injection, e.g. `sidecar.istio.io/inject: "false"` |
| crdHook.podSecurityContext | object | `{}` | pod-level security context for CRD installation job required by some admission policies (e.g. Kyverno `restrict-seccomp-strict`) check `kubectl explain pod.spec.securityContext` for details |
| crdHook.resources | object | `{}` | resource limits and requests for CRD installation job |
| crdHook.tolerations | list | `[]` | tolerations for CRD installation job |
| dashboards.additionalLabels | object | `{"grafana_dashboard":""}` | labels to add to a secret with dashboards |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ spec:
labels:
{{- include "altinity-clickhouse-operator.labels" . | nindent 8 }}
app.kubernetes.io/component: crd-install-hook
{{- with .Values.crdHook.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "altinity-clickhouse-operator.fullname" . }}-crd-install
restartPolicy: OnFailure
{{- with .Values.crdHook.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.crdHook.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/clickhouse-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,12 @@
"annotations": {
"type": "object"
},
"podAnnotations": {
"type": "object"
},
"podSecurityContext": {
"type": "object"
},
"containerSecurityContext": {
"type": "object"
}
Expand Down
11 changes: 11 additions & 0 deletions deploy/helm/clickhouse-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ crdHook:
affinity: {}
# crdHook.annotations -- additional annotations for CRD installation job
annotations: {}
# crdHook.podAnnotations -- additional annotations for CRD installation job pod template
# useful to opt out of service mesh injection, e.g. `sidecar.istio.io/inject: "false"`
podAnnotations: {}
# crdHook.podSecurityContext -- pod-level security context for CRD installation job
# required by some admission policies (e.g. Kyverno `restrict-seccomp-strict`)
# check `kubectl explain pod.spec.securityContext` for details
podSecurityContext: {}
# runAsNonRoot: true
# runAsUser: 1000
# seccompProfile:
# type: RuntimeDefault
# crdHook.containerSecurityContext -- container security context for CRD installation job
# check `kubectl explain pod.spec.containers.securityContext` for details
containerSecurityContext: {}
Expand Down
Loading
0