1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Merge pull request #141 from arangodb/bugfix/no-stickyness-for-lb

No stickyness for EA service of type LoadBalancer
This commit is contained in:
Ewout Prangsma 2018-05-17 11:43:46 +02:00 committed by GitHub
commit 2c9e42f136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -4,5 +4,4 @@ metadata:
name: "example-simple-single"
spec:
mode: Single
single:
storageClassName: my-local-ssd
image: arangodb/arangodb-preview:3.3

View file

@ -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)