Skip to content
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

UpdateSelector: add field #240

Merged
merged 4 commits into from
Apr 22, 2024
Merged

UpdateSelector: add field #240

merged 4 commits into from
Apr 22, 2024

Conversation

l0kix2
Copy link
Collaborator

@l0kix2 l0kix2 commented Apr 16, 2024

Introduced new UpdateSelector field in spec which can be one of:
- "" (empty) — field is not considered at all, which is backward compatible with using EnableFullUpdate
- Nothing — no component can be updated (logs will indicate a reason)
- MasterOnly — only master will be updated (flow with safety checks/safe mode/snapshots/exit read only), other components' updates will be ignored
- TabletNodesOnly — only tablet nodes will be updated (with removing tablet bundles and recreating them after the update)
- ExecNodesOnly — only exec nodes will be updated (without extra steps, because it is stateless component)
- StatelessOnly — everything apart from master and tablet nodes will be updated (currently it is the same as so called local update flow)
- Everything — everything will be updated at once (currently it is the same as so called Full update flow)
I've called the new field experimental since I'm not sure if we will want to support all that behaviours in the future after #115

Also Flow field is added to UpdateStatus which is persisted with transition to the Updating status. Usage can be seen in #239

@l0kix2 l0kix2 force-pushed the add_update_strategy_field branch 4 times, most recently from cc59df9 to 3d8c084 Compare April 17, 2024 07:29
@l0kix2 l0kix2 changed the title Add update strategy field UpdateStrategy: add field Apr 17, 2024
@l0kix2 l0kix2 marked this pull request as ready for review April 18, 2024 10:52
@l0kix2 l0kix2 changed the title UpdateStrategy: add field UpdateSelector: add field Apr 18, 2024
@l0kix2 l0kix2 requested a review from koct9i April 19, 2024 11:31
type UpdateStatus struct {
//+kubebuilder:default:=None
State UpdateState `json:"state,omitempty"`
Components []string `json:"components,omitempty"`
Flow UpdateFlow `json:"flow,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment that this field means - it goes into CRD and api.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

type UpdateSelector string

const (
UpdateSelectorNone UpdateSelector = ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"None" is confusing, especially when it is not "Nothing".
Maybe "Unspecified".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@l0kix2 l0kix2 merged commit 519d6ab into main Apr 22, 2024
4 checks passed
@l0kix2 l0kix2 deleted the add_update_strategy_field branch April 22, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants