-
Notifications
You must be signed in to change notification settings - Fork 21
restart redpanda on changes to the cluster configuration #603
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| project: operator | ||
| kind: Changed | ||
| body: The operator is going to restart the cluster on any change to the cluster configuration | ||
| time: 2025-04-03T13:12:31.215439+02:00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Mentioned in slack but saying it here as well, this won't work as expected. This will trigger a restart before the cluster config is applied.
I think our best option is to do some hackery within the operator when
useFluxis false (This is now the default in Azure so we should be good to go).In broad strokes, you'll want to get the cluster config's version and inject it into an annotation on the redpanda Pods.
In
reconcileResources(which isreconcileDefluxin the release/2.3.x and release/2.4.x branch), you should acquire the version and set it:I see ~2 options for getting the version. You can either make an admin client and pull it directly (1) or you could update
reconcileClusterConfigstash the cluster config version onto the Status and/or Condition (2) and then read that withinreconcileResources.Option 1 feels kinda hacky but I think it'll be the fastest way to get this done.
Option 2 "fits" into the operator a bit better IMO. We're it me, I'd update the
syncer.Syncto return(ClusterConfigVersion, error)and then stash the version in theMessageof the cluster config condition:Then you can set the annotation to the value of message.
I'd strongly recommend adding a test case to
RedpandaControllerSuiteto make sure this works as expected.You'll also likely want to work off the
release/2.3.xbranch as that's what's currently being deployed into cloud.