✨ Add support to clusterctl for inserting workload kubeconfig into an existing kubeconfig file#11942
✨ Add support to clusterctl for inserting workload kubeconfig into an existing kubeconfig file#11942dmvolod wants to merge 1 commit intokubernetes-sigs:mainfrom
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. DetailsNeeds 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.
I left one nits, but otherwise looks good.
/lgtm
| } | ||
| } | ||
|
|
||
| const workloadKubeconfig = `apiVersion: v1 |
There was a problem hiding this comment.
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.
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.
Then, let's move constants to embedded way after it or asynchronously.
|
LGTM label has been added. DetailsGit tree hash: 9989754b9f0d1c43516c96d2d986b122b165cc56 |
|
New changes are detected. LGTM label has been removed. |
sivchari
left a comment
There was a problem hiding this comment.
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.
| //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.
| var existingKubeconfig string | ||
|
|
||
| //go:embed testdata/workload-kubeconfig.yaml | ||
| var workloadKubeconfig string |
There was a problem hiding this comment.
| var workloadKubeconfig string | |
| var singleWorkloadKubeconfig string |
| var workloadKubeconfig string | ||
|
|
||
| //go:embed testdata/joined-kubeconfig.yaml | ||
| var joinedKubeconfig string |
There was a problem hiding this comment.
| var joinedKubeconfig string | |
| var multipleWorkloadKubeconfig string |
… 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. DetailsIn 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. DetailsIn 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. DetailsInstructions 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 |
|
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 |
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