Fix named ports

This commit is contained in:
CarlosEDP 2019-08-08 19:39:08 -03:00
parent 4ae33be2c7
commit ff1a34d1ab
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
'-es.timeout=60s', '-es.timeout=60s',
'-es.all=true', '-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.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.withRunAsNonRoot(true) +
container.mixin.securityContext.withRunAsUser(1000) + container.mixin.securityContext.withRunAsUser(1000) +

View File

@ -23,7 +23,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
local smtpServer = local smtpServer =
container.new('smtp-server', $._config.imageRepos.smtpServer + ':' + $._config.versions.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([ container.withEnv([
{ {
name: 'GMAIL_USER', name: 'GMAIL_USER',