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.3 #380

Merged
merged 1 commit into from
Jun 3, 2024

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.3

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 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
@xrstf xrstf changed the title update to controller-runtime 0.18.1 update to controller-runtime 0.18.3 May 27, 2024
@xrstf xrstf requested a review from embik May 27, 2024 11:18
Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: db63db8b1af571ce60a78261e9030e9656b2e0ef

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 3, 2024
@kubermatic-bot kubermatic-bot merged commit e80fa4e into kubermatic:main Jun 3, 2024
11 checks passed
@xrstf xrstf deleted the ctrl-runtime-0.18 branch October 14, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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). lgtm Indicates that a PR is ready to be merged. 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.

3 participants