From b1d0a1fe1c6ed3596fe22f3f0b9c96afff1527e6 Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Wed, 27 Feb 2019 09:32:17 -0300 Subject: [PATCH] Fix ES deployment --- elasticsearch_exporter.jsonnet | 2 +- manifests/elasticexporter-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch_exporter.jsonnet b/elasticsearch_exporter.jsonnet index d647ead..5d28cc7 100644 --- a/elasticsearch_exporter.jsonnet +++ b/elasticsearch_exporter.jsonnet @@ -29,7 +29,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; container.mixin.securityContext.capabilities.withDrop(['SETPCAP' , 'MKNOD' , 'AUDIT_WRITE' , 'CHOWN' , 'NET_RAW' , 'DAC_OVERRIDE' , 'FOWNER' , 'FSETID' , 'KILL' , 'SETGID' , 'SETUID' , 'NET_BIND_SERVICE' , 'SYS_CHROOT' , 'SETFCAP']) + container.mixin.securityContext.withRunAsNonRoot(true) + container.mixin.securityContext.withRunAsUser(1000) + - container.mixin.securityContext.withReadOnlyRootFilesystem('true') + + container.mixin.securityContext.withReadOnlyRootFilesystem(true) + container.mixin.resources.withRequests({memory: "64Mi", cpu: "25m"}) + container.mixin.resources.withLimits({memory: "128Mi", cpu: "100m"}) + container.mixin.livenessProbe.httpGet.withPath('/health') + diff --git a/manifests/elasticexporter-deployment.yaml b/manifests/elasticexporter-deployment.yaml index 54c60e1..58eb903 100644 --- a/manifests/elasticexporter-deployment.yaml +++ b/manifests/elasticexporter-deployment.yaml @@ -67,7 +67,7 @@ spec: - NET_BIND_SERVICE - SYS_CHROOT - SETFCAP - readOnlyRootFilesystem: "true" + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 restartPolicy: Always