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

🐛: Make sure the Kubernetes API Server service already created on remote cluster before applying ClusterResourceSets #8048

Merged
merged 1 commit into from
Mar 14, 2023
Merged

🐛: Make sure the Kubernetes API Server service already created on remote cluster before applying ClusterResourceSets #8048

merged 1 commit into from
Mar 14, 2023

Conversation

Levi080513
Copy link
Contributor

What this PR does / why we need it:
kube-apiserver select the first valid IP from ServiceClusterIPRange to use as the GenericAPIServer service IP, if apply ClusterResourceSet before default kubernetes service has beed created, the GenericAPIServer service IP may assign to other service and it will make default kubernetes service always create failed by service IP conflict.

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 2, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Feb 2, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @Levi080513!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 2, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @Levi080513. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 2, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 2, 2023
@killianmuldoon
Copy link
Contributor

Thanks for the contribution @Levi080513! I have a few questions about this bug - would be great if you could chime in on the issue - #7804

@Levi080513
Copy link
Contributor Author

@killianmuldoon done

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Last round of nits from my side. @JessHu it would be great if you could review to ensure it solves the problem you've encountered.

@killianmuldoon
Copy link
Contributor

Thanks @Levi080513!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 3, 2023
@killianmuldoon
Copy link
Contributor

@Levi080513 can you squash the commits when you get a chance?

@killianmuldoon
Copy link
Contributor

Just a github rate limit flake

/retest

@Levi080513
Copy link
Contributor Author

@Levi080513 can you squash the commits when you get a chance?

done

Copy link
Contributor

@jessehu jessehu left a comment

Choose a reason for hiding this comment

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

Adding suggestion for wording and log msg.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2023
@Levi080513 Levi080513 changed the title 🐛: Make sure default kubernetes service of remote cluster has been created before apply ClusterResourceSet 🐛: Make sure the default kubernetes service of remote cluster has been created before applying ClusterResourceSets Feb 5, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 7, 2023
@jessehu
Copy link
Contributor

jessehu commented Mar 14, 2023

/retest

1 similar comment
@Levi080513
Copy link
Contributor Author

/retest

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Just one small comment on the test. @Levi080513 do you want to open an issue to track if there's a requirement to solve the kube-dns part of this in a follow-up?

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 14, 2023
@killianmuldoon
Copy link
Contributor

killianmuldoon commented Mar 14, 2023

Sorry - still a couple of nits - hit the lgtm button too early 😅

@killianmuldoon
Copy link
Contributor

/remove-lgtm

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 14, 2023
@Levi080513
Copy link
Contributor Author

Just one small comment on the test. @Levi080513 do you want to open an issue to track if there's a requirement to solve the kube-dns part of this in a follow-up?

/lgtm

@killianmuldoon I will open an issue to track it, and this is still a problem.
But now I don't know what is the best solution to solve it.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Thanks for the fixups!

Could you squash the commits?

…eated before applying the ClusterResourceSet.
@Levi080513
Copy link
Contributor Author

Thanks for the fixups!

Could you squash the commits?

done

Copy link
Contributor

@killianmuldoon killianmuldoon 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 Mar 14, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e76a9ae94b5355d5ae57d5990c92c2a11243004e

@sbueringer
Copy link
Member

/approve

/cherry-pick release-1.4

@k8s-infra-cherrypick-robot

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

In response to this:

/approve

/cherry-pick release-1.4

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/test-infra 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 Mar 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 55e2bde into kubernetes-sigs:main Mar 14, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.4 milestone Mar 14, 2023
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #8286

In response to this:

/approve

/cherry-pick release-1.4

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/test-infra repository.

@k8s-infra-cherrypick-robot

@killianmuldoon: #8048 failed to apply on top of branch "release-1.3":

Applying: make sure Kubernetes API Server service of remote cluster has been created before applying the ClusterResourceSet.
Using index info to reconstruct a base tree...
M	exp/addons/internal/controllers/clusterresourceset_controller.go
M	exp/addons/internal/controllers/clusterresourceset_controller_test.go
M	exp/addons/internal/controllers/clusterresourceset_helpers.go
M	exp/addons/internal/controllers/clusterresourceset_helpers_test.go
Falling back to patching base and 3-way merge...
Auto-merging exp/addons/internal/controllers/clusterresourceset_helpers_test.go
Auto-merging exp/addons/internal/controllers/clusterresourceset_helpers.go
CONFLICT (content): Merge conflict in exp/addons/internal/controllers/clusterresourceset_helpers.go
Auto-merging exp/addons/internal/controllers/clusterresourceset_controller_test.go
CONFLICT (content): Merge conflict in exp/addons/internal/controllers/clusterresourceset_controller_test.go
Auto-merging exp/addons/internal/controllers/clusterresourceset_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 make sure Kubernetes API Server service of remote cluster has been created before applying the ClusterResourceSet.
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.3

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/test-infra repository.

@johannesfrey
Copy link
Contributor

/area clusterresourceset

@k8s-ci-robot k8s-ci-robot added the area/clusterresourceset Issues or PRs related to clusterresourcesets label Jun 16, 2023
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/clusterresourceset Issues or PRs related to clusterresourcesets 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants