-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use ClusterIP service name for connecting to memcached #1618
Conversation
- replace memcached headless service with ClusterIP - make Flux use the memcached ClusterIP name instead of SRV records
.. and probably in most people's deployments, for the same reason. This ought to require a change in arguments, so it doesn't break when the image is updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest making it possible to tell fluxd to use the FixedServerMemcacheClient instead (and changing the example manifests and chart so they do that). Otherwise, this is a change that will break every deployment of fluxd.
// Since DNS returns records in different order each time, we sort to | ||
// guarantee best possible match between nodes. | ||
sort.Strings(servers) | ||
servers := []string{fmt.Sprintf("%s:11211", c.hostname)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to change this; Use FixedServerMemcacheClient
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right to me -- does it work? :-)
@@ -17,7 +17,7 @@ spec: | |||
labels: | |||
name: flux | |||
spec: | |||
serviceAccount: flux | |||
serviceAccountName: flux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well caught
I've installed the chart with ClusterIP on and off, both are working fine. There is one caveat with helm upgrade since the ClusterIP field is immutable. The upgrade fails with:
In order to fix the upgrade you need to delete the headless service upfront:
|
OK -- we'll just need to flag this up in the chart release notes (and give it a minor version bump). |
@squaremo I've added a note to the chart changelog with the upgrade instructions. |
memcached-service
is set to string emptyFix: #1591
Test image: stefanprodan/flux:mem-v5
PS. This is a breaking change in the Helm chart, using the new image with the old chart will not work since the old chart deploys memcached with a headless service