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

Add admission controller #513

Merged
merged 14 commits into from
May 12, 2022
Merged

Add admission controller #513

merged 14 commits into from
May 12, 2022

Conversation

sachinkumarsingh092
Copy link
Contributor

@sachinkumarsingh092 sachinkumarsingh092 commented Apr 28, 2022

What this PR does / why we need it:
A new controller, called the ByoAdmission controller, would automatically approve these requests and admit the hosts into the capacity pool.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #499

Additional information
Changes for admission controller:

  • /controllers/infrastructure/byoadmission_controller.go: The implementation of the controller for automatic CSR approval.
  • /controllers/infrastructure/byoadmission_controller_test.go: Tests for the controller.
  • /main.go: Adding the controller to the manager.

Special notes for your reviewer

This builds on top of #510 so will have some overlapping commits. Once that is merged, we can rebase it.

@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2022

Codecov Report

Merging #513 (fbf0781) into main (cd30026) will increase coverage by 0.27%.
The diff coverage is 81.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #513      +/-   ##
==========================================
+ Coverage   63.88%   64.15%   +0.27%     
==========================================
  Files          25       27       +2     
  Lines        1902     1992      +90     
==========================================
+ Hits         1215     1278      +63     
- Misses        608      633      +25     
- Partials       79       81       +2     
Impacted Files Coverage Δ
...trollers/infrastructure/byoadmission_controller.go 81.48% <81.48%> (ø)
agent/main.go 13.71% <0.00%> (-0.08%) ⬇️
apis/infrastructure/v1beta1/byoclustertemplate.go 100.00% <0.00%> (ø)
...ontrollers/infrastructure/byomachine_controller.go 65.06% <0.00%> (+0.09%) ⬆️
agent/registration/host_registrar.go 15.09% <0.00%> (+15.09%) ⬆️

Dharmjit Singh and others added 11 commits May 4, 2022 22:20
CSR registration wnd BootstrapAuthenticator will be handled behind SecureAccess feature flag.
CSR resource will be created in the management cluster on the start of
the HostAgent.
BootstrapAuthenticator controller will watch the CSR resources.
Currently placeholders are created for different flows and the
implementation will be raised in differemt PRs
Signed-off-by: Sachin Kumar Singh <[email protected]>
Signed-off-by: Sachin Kumar Singh <[email protected]>
Signed-off-by: Sachin Kumar Singh <[email protected]>
Signed-off-by: Sachin Kumar Singh <[email protected]>
Signed-off-by: Sachin Kumar Singh <[email protected]>
Signed-off-by: Sachin Kumar Singh <[email protected]>
Copy link
Contributor

@anusha94 anusha94 left a comment

Choose a reason for hiding this comment

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

lgtm.

Copy link
Contributor

@dharmjit dharmjit left a comment

Choose a reason for hiding this comment

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

LGTM

@sachinkumarsingh092 sachinkumarsingh092 merged commit c917aec into vmware-tanzu:main May 12, 2022
@sachinkumarsingh092 sachinkumarsingh092 deleted the add-admission-controller branch May 13, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ByoAdmission Controller
5 participants