Merge pull request #2271 from BennX/master

Add SessionAffinity ClusterIP to prometheus service
This commit is contained in:
Frederic Branczyk
2019-01-08 21:50:29 +01:00
committed by GitHub

View File

@@ -38,6 +38,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local prometheusPort = servicePort.newNamed('web', 9090, 'web');
service.new('prometheus-' + $._config.prometheus.name, { app: 'prometheus', prometheus: $._config.prometheus.name }, prometheusPort) +
service.mixin.spec.withSessionAffinity('ClientIP') +
service.mixin.metadata.withNamespace($._config.namespace) +
service.mixin.metadata.withLabels({ prometheus: $._config.prometheus.name }),
[if $._config.prometheus.rules != null && $._config.prometheus.rules != {} then 'rules']: