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

[controller-manager] Switch main Project controller to controller-runtime #6645

Merged
merged 14 commits into from
Sep 12, 2022

Conversation

timebertt
Copy link
Member

How to categorize this PR?

/area dev-productivity scalability
/kind enhancement

What this PR does / why we need it:

  • Refactor the main Project controller to controller-runtime.
  • Cleanup technical debt in the Project controller
  • upgrade controller-runtime to v0.12.3
  • add an e2e test for project extension roles
  • small changes to how ginkgo reports in unit and integration tests

Which issue(s) this PR fixes:
Part of #4251

Special notes for your reviewer:

Release note:

NONE

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related kind/enhancement Enhancement, improvement, extension labels Sep 7, 2022
@gardener-prow gardener-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Sep 7, 2022
@timebertt
Copy link
Member Author

I stress-tested the new integration test a bit to hopefully not introduce the next flaky test:

$ stress -ignore "(unable to grab random port)" -p 32 ./test/integration/controllermanager/project/project/project.test -ginkgo.progress
...
3m45s: 96 runs so far, 0 failures

@timebertt
Copy link
Member Author

I dropped 8a13cd7 again, because it prevents go test from caching test results.

@rfranzke
Copy link
Member

rfranzke commented Sep 9, 2022

/assign

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

Very nice PR, loved reviewing it :) The tests are just awesome!

ClusterRole aggregration only works with a running kube-controller-manager,
thus it doesn't work in envtest.
One way to test it, would be to mimic the controller.
However, we have a proper setup for executing tests against a full-fledged
cluster (e2e tests), so rather use this one instead.
This makes sure, that the extension roles mechanism actually works e2e.
- only perform deletion action if gardener finalizer is still present
- watch namespace to immediately release the project once its namespace is gone
Also, don't ignore errors when patching status
@rfranzke
Copy link
Member

/lgtm
/approve

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Sep 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rfranzke

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

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2022
@rfranzke
Copy link
Member

/test pull-gardener-integration

@gardener-prow gardener-prow bot merged commit 3ca1591 into gardener:master Sep 12, 2022
@rfranzke rfranzke changed the title Switch main Project controller to controller-runtime [controller-manager] Switch main Project controller to controller-runtime Sep 23, 2022
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. area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants