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

✨ Allow CAPBK to generate JoinConfiguration discovery kubeconfig #10799

Merged

Conversation

vincepri
Copy link
Member

What this PR does / why we need it:

When using file based discovery, the current approach is generally limiting in how users will need to use WriteFiles directly and interpolate an entire Kubeconfig. This PR solves that issue by offering a way to generate the config automatically and prefilling usual information needed for the Kubeconfig to connect to the cluster

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 #

@vincepri vincepri added the area/bootstrap Issues or PRs related to bootstrap providers label Jun 26, 2024
@vincepri vincepri changed the title Allow CAPBK to generate JoinConfiguration discovery kubeconfig ✨ Allow CAPBK to generate JoinConfiguration discovery kubeconfig Jun 26, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2024
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch from fd41ad6 to de3b89b Compare June 26, 2024 16:12
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch 4 times, most recently from 4070b0b to b2308d0 Compare June 26, 2024 19:11
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2024
@sbueringer sbueringer force-pushed the cabpk-generate-file-discovery branch 2 times, most recently from cda9f76 to e03d9f1 Compare June 28, 2024 13:08
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch from e03d9f1 to 0fe41cc Compare June 28, 2024 14:30
@vincepri vincepri removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 28, 2024
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch 4 times, most recently from 64608a0 to a28098a Compare June 28, 2024 15:45
@sbueringer
Copy link
Member

@vincepri Looks like unit tests are not happy yet :).

@sbueringer
Copy link
Member

First round of review

@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch 2 times, most recently from bbc6598 to 7c42e01 Compare July 2, 2024 15:32
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch from 7c42e01 to 1f74df6 Compare July 2, 2024 15:43
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch 2 times, most recently from 9a6e794 to e264b15 Compare July 4, 2024 21:46
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch from e264b15 to f529cc3 Compare July 5, 2024 14:14
Signed-off-by: Vince Prignano <vince@prigna.com>
@vincepri vincepri force-pushed the cabpk-generate-file-discovery branch from f529cc3 to 1169522 Compare July 5, 2024 22:27
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 13e18674c8d9bd890da2df3718d78e842abbc3d7

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

@sbueringer
Copy link
Member

/cherry-pick release-1.7

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.7

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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2024
@k8s-ci-robot k8s-ci-robot merged commit d79694c into kubernetes-sigs:main Jul 8, 2024
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.8 milestone Jul 8, 2024
@k8s-infra-cherrypick-robot

@sbueringer: #10799 failed to apply on top of branch "release-1.7":

Applying: Allow CAPBK to generate JoinConfiguration discovery kubeconfig
Using index info to reconstruct a base tree...
M	Makefile
M	bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
M	bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
M	bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go
M	bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
M	bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go
M	bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go
M	bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go
M	controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
M	controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
M	internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go
M	internal/apis/controlplane/kubeadm/v1alpha3/conversion.go
M	internal/apis/controlplane/kubeadm/v1alpha4/conversion.go
Falling back to patching base and 3-way merge...
Auto-merging internal/apis/controlplane/kubeadm/v1alpha4/conversion.go
Auto-merging internal/apis/controlplane/kubeadm/v1alpha3/conversion.go
Auto-merging internal/apis/bootstrap/kubeadm/v1alpha4/zz_generated.conversion.go
Auto-merging controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
Auto-merging controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
Auto-merging bootstrap/kubeadm/types/upstreamv1beta4/zz_generated.conversion.go
Auto-merging bootstrap/kubeadm/types/upstreamv1beta3/zz_generated.conversion.go
Auto-merging bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go
Auto-merging bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
Auto-merging bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go
Auto-merging bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
Auto-merging bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
Auto-merging Makefile
CONFLICT (content): Merge conflict in Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Allow CAPBK to generate JoinConfiguration discovery kubeconfig
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.7

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/bootstrap Issues or PRs related to bootstrap providers cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants