Skip to content

Conversation

@fwiesel
Copy link
Contributor

@fwiesel fwiesel commented Nov 18, 2025

When maintenance is set, it will trigger an eviction via the respective CRD and reflect the result back to the hypervisor status.

@fwiesel fwiesel requested a review from notandy November 18, 2025 10:29
@fwiesel fwiesel requested a review from notandy November 18, 2025 11:42
Copy link
Contributor

@notandy notandy left a comment

Choose a reason for hiding this comment

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

I think we need to have a call about this implementation.
The controller want's to take care of:

  • Eviction condition
  • the evicted status field probably makes also most sense in the eviction controller itself
  • ready status
    and conflicts with the other controllers, but it doesn't cleanup / remove stuff from other controllers. This feels too complex to be reviewed by me currently

When maintenance is set, it will trigger an eviction via the respective
CRD and reflect the result back to the hypervisor status.
@fwiesel fwiesel requested a review from notandy November 19, 2025 10:58
@fwiesel
Copy link
Contributor Author

fwiesel commented Nov 19, 2025

I've used semantic equality, as controller-runtime also switched to that. I vaguely had in the back of my mind that there was some problem with reflect.DeepEqual(), that's why I looked it up. (Not that it would matter for our use-case really).

@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 39.71% (+1.46%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1/hypervisor_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_maintenance_controller.go 71.60% (+4.94%) 81 (+39) 58 (+30) 23 (+9) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_maintenance_controller_test.go

@fwiesel fwiesel merged commit 584a1c2 into main Nov 20, 2025
7 checks passed
@fwiesel fwiesel deleted the evict-on-maintance branch November 20, 2025 10:16
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.

3 participants