-
Notifications
You must be signed in to change notification settings - Fork 893
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
Installs kubeflow-gateway in ISTIO namespace #1211
Conversation
Hi @shawnzhu. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/assign @jlewi |
Thanks for doing this! This looks good to me. @yanniszark @krishnadurai @animeshsingh Any concerns/suggestions on how we should merge this to avoid wide disruptions? My inclination is to just merge this, wait for it to be picked up by downstream systems/tests, surface any bugs and then rollback or forward fix as appropriate. On GCP for example once its merged it will be picked up by the auto-deployments: That could potentially surface integration issues not captured by the presubmits. We can then rollback or forward fix depending on which is the most appropriate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawnzhu thanks for taking this effort.
@jlewi in a bid to push this forward, here are the places I know where this change would affect:
- Notebook controller makes a virtual service with the gateway. This change is relatively harmless since the gateway is acquired from the ENV var, though I suggest that we change the default value here:
- KFServing has a couple of configurations with gateway references:
and
@krishnadurai Thanks for the pointers. I can take care of 2) while spend more time on 3) on why it doesn't fail tests |
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@krishnadurai per 2) from #1211 (review), I made 0982840 and 420c408 |
@krishnadurai @shawnzhu @nrchakradhar Should we be creating our own If IIUC the ISTIO gateway is what's configuring the set of envoy pods that act as an ingress gateway to the cluster. So there should be a 1:1 ratio of ingress gateways to gateway pods. I believe the ISTIO config includes a set of pods comprising the ingress. Does it also include a gateway? |
Thanks @shawnzhu for this PR. The recent kfserving and knative kustomizev3 manifests PR was done by your fellow IBMer @adrian555 - would be good for you folks to syncup once on this. The biggest consequence of any gateway related PRs falls on KFServing, given the KNative/Istio being part of the core. Given @yuzisun is currently most impacted by any of these, he would be the best person to triage any Istio related PRs from KFServing side. |
It looks to me like when you install ISTIO it will include a Gateway resource to describe the loadbalancer (envoy proxies) operating at the edge of the mesh. So I'm not sure we should be creating a "kubeflow-gateway" resource. Here's what I think we are aiming to do on GCP
@shawnzhu my suggestion would be to use this PR to make the gateway in our virtual services settable with a kpt setter. We can then keep the default value of "kubeflow-gateway" so that we don't break anything. /cc @yuzisun |
And
Istio comes with a default IngressGateway (istio-ingressgateway) and pods which handle the requests - acting like a load balancer, though it does not come with a default Gateway resource with the default istio charts. Perhaps it does for GCP's install. If we need it to be an additional install for non-GCP setups, we could add the resource separately in KfDef specs. How does this sound? |
It takes me a while to figure this out and this is what I found: Problem 1
However, it doesn't create any Gateway resource when installing istio v1.3.1 or v1.1.6 from this repo, which is inconsistent with Original problemAccording to #1169, the two risks (IMHO) are:
Proposal
|
@shawnzhu Thanks for the deep research! Your proposal seems good to me. It might also be helpful in follow on PRs to think about how we organize the ISTIO manifests. I think part of the confusion is that the directory
It might be better to separate these and put platform specific resources under platform specific directories e.g. move all iap resources to gcp directory. Similarly, it looks like resources for configuring dex with ISTIO should maybe move to their own directories. Not to further confuse things an alternative to using a A kpt fn basically takes YAML in and emits YAML out. It would look for all the virtual services and then apply some logic to change them. The main advantages of this are
On GCP we will likely end up defining a kpt/kustomize fn in order to apply the changes we need to the manifests generated by
kpt fn's can be configured with a CR like object. So we will define an appropriate CR in order to apply all the transformations we need ontop of the istioctl generated manifests e.g.
|
kubeflow/kfctl#345 is an example of a |
The kpt setter sounds like an interesting proposal. How would we handle VirtualServices that are created at runtime in that case? (e.g., VirtualServices created by the Notebook Controller). In addition, I would like to add an argument for using our own Gateway CR ( As an example use-case, let's say a user wants to serve kubeflow under host |
Any application dynamically creating virtual services would need to be configurable (e.g. command line arguments) to allow the VS to be customized.
My understanding is that a Gateway CR is controlling the config applied to the envoy pods providing the ingress gateway. I don't think you can have two Gateway's mapping to the same set of pods. I think this would likely produce problems because you have two different controllers battling for the same set of pods. My suspicion is that the "kubeflow-gateway" is currently not having any effect because its selector is not matching any pods since the pods are in a different namespace. |
This is my fun experience with Following the official guide Multi-user, auth-enabled Kubeflow with kfctl_istio_dex by using kfctl_istio_dex.yaml
Assuming altering
I repeated above step for other 10 virtual services pointed to So the 1) of proposal #1211 (comment) can be achieved via
That would be a separate issue as enhancement to fix in order to fix #1169 |
@shawnzhu Thats great. So do you want to check in the results of |
Yes to those inline fields references like |
I don't think we have a solution yet for integration. One solution would be to use stacks. The stacks are meant to be top-level kustomize packages that combine together several different kustomize packages. So one option would be to put the KptFile there. |
@jlewi just a few thoughts on setter vs function.
The big differentiation for the manifest developer, as I understand it, is that functions are reusable, while setters are not. This is why I think it's a good fit for a function. I'm not saying we should throw what we have, but what do you think is the best way eventually? Do you agree with this reasoning? |
@yanniszark I think what you highlight is accurate. Some additional things to consider
|
@shawnzhu ping? |
@jlewi I've discussed the current situation with @Tomcli and @adrian555 especially possible break change on kfserving, so here's what I learned:
So dues to the complexity of delivering proposed changes in this PR via the |
It looks like this PR is moving the "kubeflow-gateway" into the ISTIO namespace per the PR comment. Per my comments above. I don't think we want to create a "kubeflow-gateway" at all; we should just be using the gateway that ISTIO creates for its edge loadbalancers. So why bother moving "kubeflow-gateway" to the "istio-namespace"? What's the point of upgrading applications to use "kubeflow-gateway" in "istio-namespace"? Why not just update applications to use the default gateway in the "istio-namespace" So instead of moving "kubeflow-gateway" to "ISTIO" namespace how about using this PR to enable platforms to start using the ISTIO gateway. Specifically
So now platforms that want to use the ISTIO gateway as opposed to the incorrect "kubeflow-gateway" can do so and take advantage of the kpt setters to set things correctly We can then figure out an appropriate solution for KFServing; e.g. create an overlay with the appropriate config that can be used when people want to use the ISTIO gateway. |
Take my last week's experience on securing kubeflow with HTTPS, it needs to copy cert and keys from other namespace to ns
This is my proposal 2 which I planned to do in another PR. but if there's no need to keep a To be specific it will include:
I can work with @adrian555 to see if it's possible to figure out a |
3309e84
to
efc09c0
Compare
commented in #1239 (comment) about failed test cases |
Thanks for the explanation @shawnzhu Regarding your plan
Can we split this into two PRs; Do 2 &3 in one PR (this one) and do 1. in a separate PR. Here's why
I think ISTIO configuration is probably platform specific. So should we leave it up to the platform owners to properly configure ISTIO and then use the |
I've added kpt setters with field references and a
Comments? |
@shawnzhu Can we avoid using a KptFile. What about using the old style setters as a way of avoiding using
Should we reconsider just writing a Since its just go code we could make it invokable from kfctl e.g.
WDYT? kubeflow/kfctl#332 is tracking the fact that the way kfctl works doesn't preserve comments. I don't think there's any easy fix. |
I've tried the old style setters (actually used by $ kubectl-krm cfg list-setters kustomize/
Error: open kustomize/Krmfile: no such file or directory
Usage:
kubectl-krm cfg list-setters DIR [NAME] [flags]
... $ kpt cfg list-setters kustomize/
Error: open kustomize/Kptfile: no such file or directory So for the path of using
it's definitely more attractive/flexible compare to any other options, I will educate myself first. |
Can we hold this and bring it after KF 1.1 is rc is out? Something like this would impact quite a few things, specifically KFServing, and if not necessary, best to create a small design doc, bring it in community meeting and then we move forward. Definitely not recommended before 1.1 |
@animeshsingh I think you make a good point. |
Yes.
I will try! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions. |
Which issue is resolved by this Pull Request:
Related to #1169
Description of your changes:
Installs
kubeflow-gateway
,graphana-vs
, and default ClusterRbacConfig into namespaceistio-system
instead of namespacekubeflow
.According to the article RBAC - istio v1.3:
Checklist:
cd manifests/tests
make generate-changed-only
make test