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

workload entry configure command allows specifying ingress service name #28446

Merged
merged 4 commits into from
Nov 4, 2020

Conversation

stevenctl
Copy link
Contributor

We're now using east-west gateway (soon to be called expansion gateway #28196) for accessing istiod from outside the cluster. The istioctl x workload entry configure command needs to grab the IP from this instead of the ingressgateway.

@stevenctl stevenctl requested a review from a team as a code owner October 30, 2020 22:33
@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Oct 30, 2020
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 30, 2020
@stevenctl stevenctl added the release-notes-none Indicates a PR that does not require release notes. label Oct 30, 2020
@stevenctl
Copy link
Contributor Author

/retest

1 similar comment
@stevenctl
Copy link
Contributor Author

/retest

ingress, err := kubeClient.CoreV1().Services(istioNamespace).Get(context.Background(), multicluster.IstioIngressGatewayServiceName, metav1.GetOptions{})
if err == nil && ingress.Status.LoadBalancer.Ingress != nil && len(ingress.Status.LoadBalancer.Ingress) > 0 {
ingressIP = ingress.Status.LoadBalancer.Ingress[0].IP
ingress, err := kubeClient.CoreV1().Services(istioNamespace).Get(context.Background(), multicluster.IstioEastWestGatewayServiceName, metav1.GetOptions{})
Copy link
Member

Choose a reason for hiding this comment

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

since eastwest gateway is just a convention not a requirement should we make this configurable? We will want to support things like external istiod for example, or just a custom gateway setup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point I'll add discoveryServiceName or something similar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already allow specifying the IP directly, but service name might be better UX. We do need to give some kind of output here if the IP isn't available (still pending for example).

Copy link
Member

Choose a reason for hiding this comment

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

does dns name also work or just direct ip? since that will likely be used for external.

we could also take in a hostname instead of service and resolve to service ip if it's internal possibly, although not sure how challenging that is. lot of options

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now this is used to create a /etc/hosts "addendum", then in the proxy config we have discovery address as istiod.istio-system... - I figure the DNS name would have to be used as discovery address.

I think tying the gateway to a k8s service is the common case. if they're doing something special we should cover the DNS name case, the manual IP case

As far as resolving a hostname.. not sure how we'd do that? Are we trying to use the address that we resolve to and use the ClusterIP? I figure looking up by name is more reliable. I can see a <svc>.<namespace> like syntax being good so we're not restricted to the system namespace.

Copy link
Contributor Author

@stevenctl stevenctl Nov 3, 2020

Choose a reason for hiding this comment

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

Is this good for now? I'd like to be able to remove the "get ip" step from the docs.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Nov 3, 2020
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Nov 3, 2020
@stevenctl stevenctl changed the title workload entry configure command uses eastwest gateway ip workload entry configure command allows specifying ingress service name Nov 3, 2020
istioctl/cmd/workload.go Outdated Show resolved Hide resolved
Co-authored-by: Shamsher Ansari <shaansar@redhat.com>
Copy link
Member

@shamsher31 shamsher31 left a comment

Choose a reason for hiding this comment

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

Thanks.

@stevenctl
Copy link
Contributor Author

/retest

@istio-testing
Copy link
Collaborator

In response to a cherrypick label: new pull request created: #28584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. release-notes-none Indicates a PR that does not require release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants