prometheus-kube-state-metrics: Add container security context
This adds the container security context to set readOnlyRootFilesystem to true Change-Id: I1cc81e2284dbbe94739fd498ccfd3e0ee96dfdbd
This commit is contained in:
parent
2b1e7ebc21
commit
edb24bd537
@ -111,8 +111,6 @@ spec:
|
|||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
||||||
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
{{ dict "envAll" $envAll "application" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
{{ dict "envAll" $envAll "application" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
@ -124,8 +122,7 @@ spec:
|
|||||||
- name: kube-state-metrics
|
- name: kube-state-metrics
|
||||||
{{ tuple $envAll "kube_state_metrics" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "kube_state_metrics" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.kube_state_metrics | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.kube_state_metrics | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
securityContext:
|
{{ dict "envAll" $envAll "application" "kube_state_metrics" "container" "kube_state_metrics" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
command:
|
command:
|
||||||
- /tmp/kube-state-metrics.sh
|
- /tmp/kube-state-metrics.sh
|
||||||
ports:
|
ports:
|
||||||
|
@ -37,9 +37,14 @@ labels:
|
|||||||
node_selector_value: enabled
|
node_selector_value: enabled
|
||||||
|
|
||||||
pod:
|
pod:
|
||||||
user:
|
security_context:
|
||||||
kube_state_metrics:
|
kube_state_metrics:
|
||||||
uid: 65534
|
pod:
|
||||||
|
runAsUser: 65534
|
||||||
|
container:
|
||||||
|
kube_state_metrics:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
affinity:
|
affinity:
|
||||||
anti:
|
anti:
|
||||||
type:
|
type:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user