diff --git a/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml b/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml index f378c34a7..463942b94 100644 --- a/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml +++ b/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml @@ -52,8 +52,7 @@ spec: - name: elasticsearch-exporter {{ tuple $envAll "prometheus_elasticsearch_exporter" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - securityContext: - allowPrivilegeEscalation: false +{{ dict "envAll" $envAll "application" "elasticsearch_exporter" "container" "elasticsearch_exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} command: - /tmp/elasticsearch-exporter.sh - start diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 7a77adacb..59c5f0ca9 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -116,9 +116,14 @@ pod: elasticsearch-data: localhost/docker-default elasticsearch-client: elasticsearch-client: localhost/docker-default - user: + security_context: elasticsearch_exporter: - uid: 99 + pod: + runAsUser: 99 + container: + elasticsearch_exporter: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true affinity: anti: type: