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

Bootstrap kubeconfig controller #586

Merged
merged 4 commits into from
Jun 23, 2022

Conversation

anusha94
Copy link
Contributor

@anusha94 anusha94 commented Jun 10, 2022

What this PR does / why we need it:
This PR adds a new CRD BootstrapKubeconfig and corresponding controllers and tests.
Whenever a CR of Kind BootstrapKubeconfig is created, we will generate a bootstrap kubeconfig and add it to the Status.BootstrapKubeconfigData field.

This data can be consumed by the user to dump in into a file and pass it on to the agent to be used for the bootstrap-token workflow.

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 #597

@anusha94 anusha94 marked this pull request as draft June 10, 2022 05:33
@anusha94 anusha94 force-pushed the bootstrap-kubeconfig-controller branch 2 times, most recently from 613d155 to 0ca71ca Compare June 10, 2022 08:34
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2022

Codecov Report

Merging #586 (042cc55) into main (45d0b6a) will decrease coverage by 0.33%.
The diff coverage is 51.92%.

❗ Current head 042cc55 differs from pull request most recent head 1ab7863. Consider uploading reports for the commit 1ab7863 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   67.75%   67.41%   -0.34%     
==========================================
  Files          26       27       +1     
  Lines        2388     2440      +52     
==========================================
+ Hits         1618     1645      +27     
- Misses        662      679      +17     
- Partials      108      116       +8     
Impacted Files Coverage Δ
...s/infrastructure/bootstrapkubeconfig_controller.go 51.92% <51.92%> (ø)

@anusha94 anusha94 force-pushed the bootstrap-kubeconfig-controller branch 3 times, most recently from 51a6ed4 to 042cc55 Compare June 16, 2022 08:35
@anusha94 anusha94 marked this pull request as ready for review June 16, 2022 08:39
Copy link
Contributor

@Ankitasw Ankitasw left a comment

Choose a reason for hiding this comment

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

Minor comments, otherwise LGTM.
Are we going to document these changes in separate PR?

common/bootstraptoken/token.go Outdated Show resolved Hide resolved
common/bootstraptoken/token.go Outdated Show resolved Hide resolved
common/bootstraptoken/token.go Outdated Show resolved Hide resolved
apis/infrastructure/v1beta1/bootstrapkubeconfig_types.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@anusha94
Copy link
Contributor Author

Are we going to document these changes in separate PR?

@Ankitasw Yes!
@sachinkumarsingh092 will update all README and docs related to this security enhancement feature.

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.

Some basic nits only, LGTM.

apis/infrastructure/v1beta1/bootstrapkubeconfig_types.go Outdated Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
@anusha94 anusha94 force-pushed the bootstrap-kubeconfig-controller branch from a10bf84 to a524548 Compare June 21, 2022 08:21
@anusha94
Copy link
Contributor Author

@dharmjit @shamsher31

Created a new issue for webhook #605

@anusha94 anusha94 requested a review from dharmjit June 21, 2022 09:22
@anusha94 anusha94 requested review from Ankitasw and shamsher31 June 21, 2022 09:22
@Ankitasw
Copy link
Contributor

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

@anusha94 anusha94 merged commit 9e7924e into vmware-tanzu:main Jun 23, 2022
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.

Automate Bootstrap Kubeconfig Generation
6 participants