-
Notifications
You must be signed in to change notification settings - Fork 1.4k
✨ Add support to clusterctl for inserting workload kubeconfig into an existing kubeconfig file #11942
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/area clusterctl |
c014c6e to
c43c52a
Compare
|
@fabriziopandini could you please to have a look at this PR when possible |
sivchari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one nits, but otherwise looks good.
/lgtm
| } | ||
| } | ||
|
|
||
| const workloadKubeconfig = `apiVersion: v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's separate to other file. We can embed these data to use go:embed.
It's more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree with you and embed is my preferable way for big data values in tests.
But I can see, that most of the test approaches in the Cluster API tests are using constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, let's move constants to embedded way after it or asynchronously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, please review
|
LGTM label has been added. Git tree hash: 9989754b9f0d1c43516c96d2d986b122b165cc56
|
|
New changes are detected. LGTM label has been removed. |
sivchari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating. I left nits, PTAL 🙏
| //go:embed testdata/existsing-kubeconfig.yaml | ||
| var existingKubeconfig string | ||
|
|
||
| //go:embed testdata/workload-kubeconfig.yaml | ||
| var workloadKubeconfig string | ||
|
|
||
| //go:embed testdata/joined-kubeconfig.yaml | ||
| var joinedKubeconfig string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| //go:embed testdata/existsing-kubeconfig.yaml | |
| var existingKubeconfig string | |
| //go:embed testdata/workload-kubeconfig.yaml | |
| var workloadKubeconfig string | |
| //go:embed testdata/joined-kubeconfig.yaml | |
| var joinedKubeconfig string | |
| var ( | |
| //go:embed testdata/existsing-kubeconfig.yaml | |
| existingKubeconfig string | |
| //go:embed testdata/workload-kubeconfig.yaml | |
| workloadKubeconfig string | |
| //go:embed testdata/joined-kubeconfig.yaml | |
| joinedKubeconfig string | |
| ) |
Just a bit easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will fix
| var existingKubeconfig string | ||
|
|
||
| //go:embed testdata/workload-kubeconfig.yaml | ||
| var workloadKubeconfig string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var workloadKubeconfig string | |
| var singleWorkloadKubeconfig string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will fix
| var workloadKubeconfig string | ||
|
|
||
| //go:embed testdata/joined-kubeconfig.yaml | ||
| var joinedKubeconfig string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var joinedKubeconfig string | |
| var multipleWorkloadKubeconfig string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will fix
… existing kubeconfig file
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
/remove-lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
|
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/reopen |
|
@dmvolod: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/remove-lifecycle rotten |
|
/test pull-cluster-api-test-main |
|
@dmvolod: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Not sure if this should be in scope for clusterctl. Wondering if kubectl has some feature for this /cc @fabriziopandini |
What this PR does / why we need it:
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 #10133