From ff1a34d1abfcc8eee87c935220e02b5ff73ac9f1 Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Thu, 8 Aug 2019 19:39:08 -0300 Subject: [PATCH] Fix named ports --- elasticsearch_exporter.jsonnet | 2 +- smtp_server.jsonnet | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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',