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

update to controller-runtime 0.18.1 #380

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xrstf
Copy link
Contributor

@xrstf xrstf commented Apr 29, 2024

What this PR does / why we need it:
This bumps controller-runtime to 0.18 and takes the opportunity to clean up the OSP bootstrapping.

Previously, the default OSPs were reconciled once on OSM startup by watching Deployment creation in the kube-system namespace in the worker cluster.

The new code uses a channel to trigger the initial reconciliation in empty clusters. The original OSP controller would revert any OSP updates back to the version compiled into OSM, but only when a) OSM is restarted or b) a Deployment is created. So the controller is in fact reconciling like most other controllers and so is now also simply watching OSPs to reconcile unwanted changes immediately.

The reconciler also removes the ResourceVersion/Generation setting by simply not overwriting the entire OSP object (including metadata), but only overwriting its Spec when reconciling.

I also removed the duplicated OSP map (the default OSPs were both embedded and kept as a duplicate in defaultOSPFiles) and instead parse the OSPs once upon startup and keep those objects around. The controller will now in general reconcile a little bit more than before, so not having to re-parse the YAML everytime should compensate for the additional reconcilings.

What type of PR is this?
/kind cleanup
/kind chore

Does this PR introduce a user-facing change? Then add your Release Note here:

Update controller-runtime to 0.18.0

Documentation:

NONE

@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Apr 29, 2024
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from xrstf. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 29, 2024
@xrstf
Copy link
Contributor Author

xrstf commented Apr 29, 2024

/test all

@xrstf
Copy link
Contributor Author

xrstf commented Apr 29, 2024

/test all

@kubermatic-bot kubermatic-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 29, 2024
@xrstf
Copy link
Contributor Author

xrstf commented Apr 29, 2024

/test all

@xrstf
Copy link
Contributor Author

xrstf commented Apr 29, 2024

/test all

@xrstf xrstf force-pushed the ctrl-runtime-0.18 branch 2 times, most recently from fddc5e8 to 89f2eaa Compare April 29, 2024 18:02
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Apr 29, 2024
@xrstf
Copy link
Contributor Author

xrstf commented Apr 29, 2024

/test all

@xrstf xrstf self-assigned this Apr 29, 2024
@xrstf xrstf marked this pull request as ready for review April 29, 2024 18:14
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 29, 2024
@xrstf xrstf changed the title update to controller-runtime 0.18.0 update to controller-runtime 0.18.1 May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants