From efe155d1368ba0d9bf6bf5b250c08c88932caead Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Thu, 17 May 2018 11:24:02 +0200 Subject: [PATCH] Do not set service stickyness for loadbalancer EA service, because AWS does not support it --- pkg/deployment/resources/services.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/deployment/resources/services.go b/pkg/deployment/resources/services.go index 45e3dc36d..c823e597a 100644 --- a/pkg/deployment/resources/services.go +++ b/pkg/deployment/resources/services.go @@ -170,6 +170,9 @@ func (r *Resources) ensureExternalAccessServices(eaServiceName, ns, svcRole, tit // Let's create or update the database external access service nodePort := spec.GetNodePort() loadBalancerIP := spec.GetLoadBalancerIP() + if eaServiceType == v1.ServiceTypeLoadBalancer { + sessionAffinity = v1.ServiceAffinityNone + } _, newlyCreated, err := k8sutil.CreateExternalAccessService(kubecli, eaServiceName, svcRole, apiObject, eaServiceType, port, nodePort, loadBalancerIP, sessionAffinity, apiObject.AsOwner()) if err != nil { log.Debug().Err(err).Msgf("Failed to create %s external access service", title)