diff --git a/elasticsearch_exporter.jsonnet b/elasticsearch_exporter.jsonnet index 4d5060e..681bd8b 100644 --- a/elasticsearch_exporter.jsonnet +++ b/elasticsearch_exporter.jsonnet @@ -40,7 +40,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; '-es.timeout=60s', '-es.all=true', ]) + - container.withPorts(containerPort.newNamed('es-metrics', 9108)) + + container.withPorts(containerPort.newNamed(9108, 'es-metrics')) + 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) + diff --git a/smtp_server.jsonnet b/smtp_server.jsonnet index dabbbb9..773ff78 100644 --- a/smtp_server.jsonnet +++ b/smtp_server.jsonnet @@ -23,7 +23,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local smtpServer = container.new('smtp-server', $._config.imageRepos.smtpServer + ':' + $._config.versions.smtpServer) + - container.withPorts(containerPort.newNamed('smtp', 25)) + + container.withPorts(containerPort.newNamed(25, 'smtp')) + container.withEnv([ { name: 'GMAIL_USER',