kubernetes-sigs / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
298 stars 65 forks source link

✨ Enhancement for virtual cluster DNS #330

Closed LuBingtan closed 1 year ago

LuBingtan commented 1 year ago

What this PR does / why we need it: Enhancement for virtual cluster DNS: https://github.com/kubernetes-sigs/cluster-api-provider-nested/issues/329

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

k8s-ci-robot commented 1 year ago

Welcome @LuBingtan!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-nested 🎉. 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-provider-nested 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. :smiley:

k8s-ci-robot commented 1 year ago

Hi @LuBingtan. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Fei-Guo commented 1 year ago

This looks a little tricky. Is the k8s_external plugin enabled by default? or is there any chance the actual external_ip field will be needed in vc (I know we did not upward synchronization it right now) ?

The bottom line is that if we want to play the trick in the syncer, we need a feature switch for sure. @christopherhein, will this help in your case?

LuBingtan commented 1 year ago

This looks a little tricky. Is the k8s_external plugin enabled by default? or is there any chance the actual external_ip field will be needed in vc (I know we did not upward synchronization it right now) ?

The bottom line is that if we want to play the trick in the syncer, we need a feature switch for sure. @christopherhein, will this help in your case?

As far as I know, the k8s_external plugin is not enabled by default.

As for the question whether the actual external_ip field is needed in vc. According this doc (https://kubernetes.io/docs/concepts/services-networking/service/#external-ips), this field is used for exposing the service on a specific node. That means it is usually set by users on purpose. We can add an if and leave this field unchanged in this case.

And I agree with you that we need a feature switch.

christopherhein commented 1 year ago

Agree about the feature switch.

Does this work with DualStacked services too? For us, we're going the route of actually making the services routable to the tenant. This might may be useful for some folks though, the patch is kind of messy.

LuBingtan commented 1 year ago

Already add a feature gate. PTAL 😄

Does this work with DualStacked services too? For us, we're going the route of actually making the services routable to the tenant. This might may be useful for some folks though, the patch is kind of messy.

As for dual-stack services, I'll give it a try and see if this works.

Fei-Guo commented 1 year ago

@LuBingtan Thanks for working on this.

/lgtm

@christopherhein I will leave it to you for approval.

LuBingtan commented 1 year ago

/retest

k8s-ci-robot commented 1 year ago

@LuBingtan: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-nested/pull/330#issuecomment-1319455379): >/retest Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Fei-Guo commented 1 year ago

Can you double check the test error?

LuBingtan commented 1 year ago

Can you double check the test error?

OK, I'll check the error

christopherhein commented 1 year ago

/ok-to-test

christopherhein commented 1 year ago

/lgtm /approve

thanks @LuBingtan

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christopherhein, LuBingtan

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: - ~~[virtualcluster/OWNERS](https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/OWNERS)~~ [christopherhein] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment