Ranger-Agent: Add pod/container security context
This updates the Ranger-Agent chart to include the pod security context on the pod template when I set to true for rangen-agent engine it going to crashloopbackoff Change-Id: I69f99d651a7d60f27c75f1718e894c84bcfea366
This commit is contained in:
parent
0d1d2417ea
commit
b6fa5da91c
|
@ -42,6 +42,7 @@ spec:
|
|||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
spec:
|
||||
{{ dict "envAll" $envAll "application" "ranger_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
hostNetwork: true
|
||||
|
@ -57,8 +58,7 @@ spec:
|
|||
image: {{ .Values.images.tags.ranger_agent }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.pod.user.ranger_agent.uid }}
|
||||
{{ dict "envAll" $envAll "application" "ranger_agent" "container" "ranger_agent_api" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||
command:
|
||||
- /tmp/ranger-agent-api.sh
|
||||
- start
|
||||
|
|
|
@ -40,6 +40,7 @@ spec:
|
|||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||
spec:
|
||||
{{ dict "envAll" $envAll "application" "ranger_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||
serviceAccountName: {{ $serviceAccountName }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
hostNetwork: true
|
||||
|
@ -55,8 +56,7 @@ spec:
|
|||
image: {{ .Values.images.tags.ranger_agent }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.engine | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.pod.user.ranger_agent.uid }}
|
||||
{{ dict "envAll" $envAll "application" "ranger_agent" "container" "ranger_agent_engine" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||
env:
|
||||
- name: USER
|
||||
valueFrom:
|
||||
|
|
|
@ -136,9 +136,17 @@ network:
|
|||
port: 30010
|
||||
|
||||
pod:
|
||||
user:
|
||||
security_context:
|
||||
ranger_agent:
|
||||
uid: 1000
|
||||
pod:
|
||||
runAsUser: 1000
|
||||
container:
|
||||
ranger_agent_api:
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
ranger_agent_engine:
|
||||
readOnlyRootFilesystem: false
|
||||
allowPrivilegeEscalation: false
|
||||
affinity:
|
||||
anti:
|
||||
type:
|
||||
|
|
Loading…
Reference in New Issue