Skip to content

Comments

V1 drop drift controller#543

Merged
jan-g merged 7 commits intomainfrom
v1-drop-drift-controller
Mar 31, 2025
Merged

V1 drop drift controller#543
jan-g merged 7 commits intomainfrom
v1-drop-drift-controller

Conversation

@jan-g
Copy link
Contributor

@jan-g jan-g commented Mar 20, 2025

This drops the drift controller and replaces it with a regular cycle of the main v1 controller. That now uses the "declarative"-style Syncer - so the practice of leaving ad hoc changes in place, that aren't mentioned in the CR, will no longer apply.

An earlier PR fixed up the Ginkgo tests to support this - should tests end up leaving multiple clusters around at the same time, there are no longer races around the ownership of a single testAdminAPI.

@jan-g jan-g marked this pull request as draft March 20, 2025 11:49
@jan-g jan-g force-pushed the v1-drop-drift-controller branch 2 times, most recently from 7c2f311 to 048fe2e Compare March 21, 2025 13:28
@jan-g
Copy link
Contributor Author

jan-g commented Mar 21, 2025

To-do here: also stash the hash of the full last-applied-configuration. Use that to short-circuit the periodic reassertion of configuration, so that actual config changes get pushed when they're seen.

Edited to add: we stash the last-applied-critical-configuration hash - that's the hash of the cluster config, considering only specified settings that require a cluster restart.

@jan-g jan-g force-pushed the v1-drop-drift-controller branch from 048fe2e to 22602d3 Compare March 21, 2025 16:49
@jan-g jan-g force-pushed the v1-drop-drift-controller branch 10 times, most recently from e5f4ee6 to a861a84 Compare March 24, 2025 18:06
@jan-g jan-g marked this pull request as ready for review March 25, 2025 09:45
jan-g added 6 commits March 28, 2025 17:46
This the first step to dropping the drift controller.
Drift detection is replaced by a periodic reassertion of desired config.
Use the generation / observed generation to trigger an immediate
configuration push, if required.
We'll have to update some of these, since the annotations applied
will have changed.
We're just using a declarative-mode assert in v1 now.
@jan-g jan-g force-pushed the v1-drop-drift-controller branch from 4cf44f8 to 90c8d4c Compare March 28, 2025 17:55
) error {
// Do not touch existing last-applied-configuration (it's not reconciled in the main loop)
if val, ok := current.Annotations[LastAppliedConfigurationAnnotationKey]; ok {
// TODO: what's this doing on here?
Copy link
Contributor

Choose a reason for hiding this comment

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

This check can be removed. Secrets are not annotated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@RafalKorepta RafalKorepta left a comment

Choose a reason for hiding this comment

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

LGTM

The update method had a spurious copy
of an annotation that's never applied
to it.
@jan-g jan-g merged commit d9feceb into main Mar 31, 2025
12 checks passed
@jan-g jan-g deleted the v1-drop-drift-controller branch March 31, 2025 17:24
jan-g added a commit that referenced this pull request Apr 4, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret

(cherry picked from commit d9feceb)

# Conflicts:
#	operator/internal/controller/vectorized/cluster_controller_configuration.go
@jan-g
Copy link
Contributor Author

jan-g commented Apr 4, 2025

💚 All backports created successfully

Status Branch Result
release/v25.1.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

alenkacz pushed a commit that referenced this pull request Apr 7, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret
alenkacz pushed a commit that referenced this pull request Apr 7, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret
RafalKorepta pushed a commit that referenced this pull request Apr 7, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret
alenkacz added a commit that referenced this pull request Apr 8, 2025
* Testing: one MockAdminAPI per cluster (#561)

Given the desire to merge the drift controller with the general
cluster reconciler, we need to track the mock admin api state
on a per-cluster basis - otherwise the rapid reassertion of state
will cause flapping as the mock API is poked on behalf of multiple
clusters.

* V1 drop drift controller (#543)

* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret

---------

Co-authored-by: jan grant <3430517+jan-g@users.noreply.github.com>
jan-g added a commit that referenced this pull request Apr 29, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret

(cherry picked from commit d9feceb)

# Conflicts:
#	operator/internal/controller/vectorized/test/cluster_controller_configuration_test.go
@jan-g
Copy link
Contributor Author

jan-g commented Apr 29, 2025

💚 All backports created successfully

Status Branch Result
release/v2.4.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

RafalKorepta pushed a commit that referenced this pull request Apr 30, 2025
* Periodically cycle to reassert cluster configuration
* Drop drift controller
* Fix up unit test failures
* Drop three-way merge code
* Drop annotation copy in secret

(cherry picked from commit d9feceb)

# Conflicts:
#	operator/internal/controller/vectorized/test/cluster_controller_configuration_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants