From 438381c3e3318bb96a96d38d99f63a53d288397c Mon Sep 17 00:00:00 2001
From: Frederic Branczyk <fbranczyk@gmail.com>
Date: Mon, 8 Apr 2019 15:56:39 +0200
Subject: [PATCH] kube-prometheus: Set Alertmanagere sessionsAffinity to
 ClientIP

---
 jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet b/jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
index 47e61e29..c46a87dc 100644
--- a/jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
+++ b/jsonnet/kube-prometheus/alertmanager/alertmanager.libsonnet
@@ -67,6 +67,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
       local alertmanagerPort = servicePort.newNamed('web', 9093, 'web');
 
       service.new('alertmanager-' + $._config.alertmanager.name, { app: 'alertmanager', alertmanager: $._config.alertmanager.name }, alertmanagerPort) +
+      service.mixin.spec.withSessionAffinity('ClientIP') +
       service.mixin.metadata.withNamespace($._config.namespace) +
       service.mixin.metadata.withLabels({ alertmanager: $._config.alertmanager.name }),
 
-- 
GitLab