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

kubeconfig flag removed in the agent #578

Merged
merged 4 commits into from
Jun 10, 2022
Merged

kubeconfig flag removed in the agent #578

merged 4 commits into from
Jun 10, 2022

Conversation

dharmjit
Copy link
Contributor

@dharmjit dharmjit commented Jun 6, 2022

What this PR does / why we need it:
This PR removes the --kubeconfig flag from the HostAgent to support only the bootstrap kubeconfig flow via --bootstrap-kubeconfig flag. Some RBACs are updated as well.

  • e2e tests which were earlier using --kubeconfig are updated and will use --bootstrap-kubeconfig flag with valid bootstrap kubeconfig with only permissions to create CSR.
  • host agent tests will use a pre-placed kubeconfig in the default path ~/.byoh/config. Please note that this kubeconfig is the one with admin priveleges.

Which issue(s) this PR fixes :
Fixes #582

@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2022

Codecov Report

Merging #578 (b08f72a) into main (9bcc762) will increase coverage by 0.35%.
The diff coverage is 20.00%.

❗ Current head b08f72a differs from pull request most recent head 7aa7b66. Consider uploading reports for the commit 7aa7b66 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #578      +/-   ##
==========================================
+ Coverage   67.46%   67.81%   +0.35%     
==========================================
  Files          27       27              
  Lines        2410     2399      -11     
==========================================
+ Hits         1626     1627       +1     
+ Misses        676      664      -12     
  Partials      108      108              
Impacted Files Coverage Δ
agent/main.go 20.83% <0.00%> (+1.38%) ⬆️
...trollers/infrastructure/byoadmission_controller.go 81.81% <100.00%> (+0.33%) ⬆️

@dharmjit dharmjit changed the title flag kubeconfig removed kubeconfig flag removed in the agent Jun 8, 2022
@dharmjit dharmjit marked this pull request as ready for review June 8, 2022 07:41
shubham14bajpai
shubham14bajpai previously approved these changes Jun 8, 2022
Copy link
Contributor

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

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

LGTM

shubham14bajpai
shubham14bajpai previously approved these changes Jun 8, 2022
Copy link
Contributor

@sachinkumarsingh092 sachinkumarsingh092 left a comment

Choose a reason for hiding this comment

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

LGTM

@dharmjit dharmjit changed the title kubeconfig flag removed in the agent [DoNotMerge]kubeconfig flag removed in the agent Jun 9, 2022
@anusha94 anusha94 marked this pull request as draft June 9, 2022 05:07
@dharmjit dharmjit changed the title [DoNotMerge]kubeconfig flag removed in the agent kubeconfig flag removed in the agent Jun 10, 2022
@dharmjit dharmjit marked this pull request as ready for review June 10, 2022 06:18
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.
I'll refactor testutils.go as part of #586

@anusha94 anusha94 merged commit 829f227 into vmware-tanzu:main Jun 10, 2022
@anusha94 anusha94 mentioned this pull request Jun 10, 2022
shivi28 pushed a commit to shivi28/cluster-api-provider-bringyourownhost that referenced this pull request Jun 13, 2022
* flag --kubeconfig removed

* Changes for fetching home dir for containers

* Create bootstrap kubeconfig for e2e tests

* update installer e2e
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.

Remove kubeconfig flag
6 participants