Skip to content

[traits/aggregate] refactor to use hypervisor.crd, add unit tests#123

Merged
fwiesel merged 4 commits into
mainfrom
refactor-traits
Sep 29, 2025
Merged

[traits/aggregate] refactor to use hypervisor.crd, add unit tests#123
fwiesel merged 4 commits into
mainfrom
refactor-traits

Conversation

@notandy

@notandy notandy commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@notandy notandy requested a review from fwiesel September 19, 2025 16:24
@notandy notandy changed the title [traits_controller] refactor to use hypervisor.crd, add unit tests [traits/aggregate] refactor to use hypervisor.crd, add unit tests Sep 19, 2025

@fwiesel fwiesel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We still need the aggregates and traits come in over labels or annotations as they come in over the shoot spec. With the patch applied, we will simply lose these on a reinstallation.

@notandy

notandy commented Sep 21, 2025

Copy link
Copy Markdown
Contributor Author

We still need the aggregates and traits come in over labels or annotations as they come in over the shoot spec. With the patch applied, we will simply lose these on a reinstallation.

Yeah I was thinking about that. Let's discuss it offline.

Previous commit changed the aggregate- and custom-traits handling to the
hypervisor-crd. This removed the persistence over new gardener rollouts.
This PR reintroduces the persistence by transporting the aggregates/traits
from server labels/annotationts to the new hypervisor CRO.

Also changes the existing code from using `controllerutil.CreateOrPatch`
to explictly checking if the objects is already there (and only
updating status in this case). Manual overrides to the CRO would have
been overwritten else.

controllerutil.CreateOrPatch behaves unpredicted in a way that it won't update
status for newly created CRO, only for existing ones.
@notandy

notandy commented Sep 28, 2025

Copy link
Copy Markdown
Contributor Author

We still need the aggregates and traits come in over labels or annotations as they come in over the shoot spec. With the patch applied, we will simply lose these on a reinstallation.

e60873c brings back the persistence via server labels/annotations for now, since we didn't discussed a long-term alternative for persistence yet.

@fwiesel

fwiesel commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Perfect, thanks.

@fwiesel fwiesel merged commit bc01b64 into main Sep 29, 2025
6 checks passed
@fwiesel fwiesel deleted the refactor-traits branch September 29, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants