Merge "Implement helm-toolkit snippet to apiserver and webhook pods/containers"

This commit is contained in:
Zuul 2020-07-06 17:11:29 +00:00 committed by Gerrit Code Review
commit 65163b5393
4 changed files with 13 additions and 0 deletions

View File

@ -214,6 +214,7 @@ spec:
- name: webhook
{{ tuple $envAll "kubernetes_keystone_webhook" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "apiserver_webhook" "container" "webhook" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
command:
- /tmp/webhook_start.sh
env:

View File

@ -215,6 +215,9 @@ pod:
apiserver:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
webhook:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
mounts:
kubernetes_apiserver:
init_container: null

View File

@ -95,6 +95,7 @@ spec:
labels:
{{ tuple $envAll "kube-apiserver" "key-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "key_rotate" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure
nodeSelector:
@ -106,6 +107,7 @@ spec:
image: {{ .Values.images.tags.key_rotate | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{ tuple $envAll $envAll.Values.pod.resources.key_rotate | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "key_rotate" "container" "apiserver_key_rotate" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
env:
- name: "ANNOTATION_NAME"
value: {{ .Values.const.encryption_annotation | quote }}

View File

@ -278,6 +278,13 @@ pod:
anchor:
runAsUser: 0
readOnlyRootFilesystem: false
key_rotate:
pod:
runAsUser: 65534
container:
apiserver_key_rotate:
runAsUser: 0
readOnlyRootFilesystem: false
mounts:
kubernetes_apiserver:
init_container: null