-
Couldn't load subscription status.
- Fork 75
fix: supports seamless upgrade socket path name with uid #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: supports seamless upgrade socket path name with uid #113
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alimaazamat The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| ) | ||
| } | ||
|
|
||
| // Enable seamless upgrades when POD_UID is available (which gets set by Helm when seamlessUpgrades.enabled=true) |
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 might be some other reason down the road that the pod UID is useful, so I think I would prefer to add a separate toggle to the config (exposed by a command line flag) that only sets the RollingUpdate option.
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.
should we instead have seamless upgrades flag instead? like isnt the user choice seamless upgrades which is done with rollingUpdate?
| rollingUpdate: | ||
| maxSurge: 1 | ||
| maxUnavailable: 0 | ||
| {{- else }} |
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.
Setting kubeletPlugin.seamlessUpgrades.enabled will silently ignore the kubeletPlugin.updateStrategy value which isn't ideal.
Maybe we could keep the existing updateStrategy template block and use a different default for maxSurge and maxUnavailable when seamless upgrades are enabled? Then kubeletPlugin.updateStrategy is still authoritative if users express an opinion on that, but only setting kubeletPlugin.seamlessUpgrades.enabled is enough to set them to values that actually exercise seamless upgrades if they don't.
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.
Just to confirm, if user provides updateStrategy but seamlessUpgrades is enabled, then overwrite just the maxSurge and maxUnavailable of the given updateStrategy?
| - name: HEALTHCHECK_PORT | ||
| value: {{ .Values.kubeletPlugin.containers.plugin.healthcheckPort | quote }} | ||
| {{- end }} | ||
| {{- if .Values.kubeletPlugin.seamlessUpgrades.enabled }} |
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.
If we don't enable seamless upgrades based on whether the pod UID is available, then I think it's reasonable to always unconditionally set this environment variable for the pods.
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.
Okay so POD_UID unconditionally set and then I added SEAMLESS_UPGRADES to yaml when enabled so that way it can be a CLI flag.
|
/assign |
39da3da to
28f1e83
Compare
28f1e83 to
ce936de
Compare
…ssUpgrades enabled for e2e tests
Fixes issue #107
Socket path names in the format {baseName}{suffix} works fine for legacy deployments but if we have seamless upgrades then it doesn't work because the socket path names include uid {baseName}-{uid}{suffix}.
Solution:
In health.go change socket path name based on config, which gets populated by helm chart value which is false by default.
How to test:
Results:
Seamless Upgrades Disabled:
Seamless Upgrades Enabled: