prometheus-openstack-exporter: Add container security context
This adds the container security context to set readOnlyRootFilesystem to true and allowPrivilegeEscalation to false Change-Id: I7b2f78b51b6ff219c371893f975a30fd89f1719b
This commit is contained in:
parent
e97faaaf0f
commit
518794cabe
@ -42,8 +42,6 @@ spec:
|
|||||||
annotations:
|
annotations:
|
||||||
{{ dict "envAll" $envAll "podName" "prometheus-openstack-exporter" "containerNames" (list "openstack-metrics-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
{{ dict "envAll" $envAll "podName" "prometheus-openstack-exporter" "containerNames" (list "openstack-metrics-exporter") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
{{ dict "envAll" $envAll "application" "openstack_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
{{ dict "envAll" $envAll "application" "openstack_exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
||||||
serviceAccountName: {{ $serviceAccountName }}
|
serviceAccountName: {{ $serviceAccountName }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
@ -55,8 +53,7 @@ spec:
|
|||||||
- name: openstack-metrics-exporter
|
- name: openstack-metrics-exporter
|
||||||
{{ tuple $envAll "prometheus_openstack_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "prometheus_openstack_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_openstack_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_openstack_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
securityContext:
|
{{ dict "envAll" $envAll "application" "openstack_exporter" "container" "openstack_metrics_exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
command:
|
command:
|
||||||
- /tmp/prometheus-openstack-exporter.sh
|
- /tmp/prometheus-openstack-exporter.sh
|
||||||
- start
|
- start
|
||||||
|
@ -42,9 +42,14 @@ pod:
|
|||||||
type: apparmor
|
type: apparmor
|
||||||
openstack-metrics-exporter:
|
openstack-metrics-exporter:
|
||||||
openstack-metrics-exporter: localhost/docker-default
|
openstack-metrics-exporter: localhost/docker-default
|
||||||
user:
|
security_context:
|
||||||
openstack_exporter:
|
openstack_exporter:
|
||||||
uid: 65534
|
pod:
|
||||||
|
runAsUser: 65534
|
||||||
|
container:
|
||||||
|
openstack_metrics_exporter:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
affinity:
|
affinity:
|
||||||
anti:
|
anti:
|
||||||
type:
|
type:
|
||||||
|
Loading…
Reference in New Issue
Block a user