fix(kfserving): add istio local gateway deployment in istio-system#177
fix(kfserving): add istio local gateway deployment in istio-system#177jal06 wants to merge 4 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jal06 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @jal06. 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. DetailsInstructions 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. |
| kind: Kustomization | ||
| namespace: istio-system | ||
| resources: | ||
| - ../../../upstream/manifests/istio/cluster-local-gateway/base |
There was a problem hiding this comment.
Hi @jal06, if the resource doesn't need any user modification, we can skip putting it in instance folder. You can just call kustomize build from the upstream folder directly.
|
Please could you elaborate more ?
If I just call kustomize build in the step That's why I don't understand how to skip putting |
|
/ok-to-test |
| mkdir -p $(BUILD_DIR)/kubeflow-issuer | ||
| kustomize build --load_restrictor none -o $(BUILD_DIR)/kubeflow-issuer $(KF_DIR)/kubeflow-issuer | ||
| mkdir -p $(BUILD_DIR)/cluster-local-gateway | ||
| kustomize build --load_restrictor none -o $(BUILD_DIR)/cluster-local-gateway $(KF_DIR)/cluster-local-gateway |
There was a problem hiding this comment.
@jal06 I was suggesting changing this line to
kustomize build --load_restrictor none -o $(BUILD_DIR)/cluster-local-gateway $(MANIFESTS_DIR)/path/to/cluster-local-gateway
because there's no need to add user customizations to that package.
There was a problem hiding this comment.
@jal06 I was suggesting changing this line to
I didn't test it, but I am not sure it could work because make apply starts by cleaning .build so cluster-local-gateway would be cleaned before being applied.
.PHONY: apply
apply: clean-build check-name check-iap apply-gcp wait-gcp create-ctxt apply-asm apply-kubeflow iap-secret
...
clean-build:
# Delete build because we want to prune any resources which are no longer defined in the manifests
rm -rf $(BUILD_DIR)/
mkdir -p $(BUILD_DIR)/
Moreover, IMHO, when putting cluster-local-gateway in instance, the process of cluster-local-gateway is consistent with the process of other applications (kubeflow-issuer, metacontroller, kubeflow, ...) so it could be easier to maintain.
WDYT ?
There was a problem hiding this comment.
@Bobgy, I am sorry, I missed th commit of cluster-local-gateway/kustomization.taml. I think it is OK now
There was a problem hiding this comment.
yes, consistency is a good point. Let me think about it more.
I was previously suggesting directly refer to upstream instead, because everything in instance folder needs user's manual maintenance (especially when upgrading), so if something doesn't need any customization, I preferred not putting it in instance folder.
There was a problem hiding this comment.
if something doesn't need any customization, I preferred not putting it in instance folder.
Agree; that makes sense
But IMHO deleting build because we want to prune any resources which are no longer defined in the manifests makes also sense and I don't see any easy solution to do it.
Let me think about it more.
OK; thanks
There was a problem hiding this comment.
@jal06
I guess you did not understand how this works
kustomize build --load_restrictor none -o $(BUILD_DIR)/cluster-local-gateway $(MANIFESTS_DIR)/path/to/cluster-local-gateway
Note that the -o $(BUILD_DIR)/cluster-local-gateway part is the output, and the $(MANIFESTS_DIR)/path/to/cluster-local-gateway part is the input.
I suggested changing $(MANIFESTS_DIR)/path/to/cluster-local-gateway to ....upstream/path/to/cluster-local-gateway, the command will hydrate it everytime you apply to build folder. So that essentially means changing source of the hydration from instance to upstream, but build folder will always be hydrated each time. There won't be a problem there.
|
Let me clarify what the two steps are doing.
The step
The step |
|
/retest |
1 similar comment
|
/retest |
|
/retest |
1 similar comment
|
/retest |
|
presubmit test (not related to your change) is failing, I'll try to fix it next week |
|
/retest |
|
@jal06: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
|
Thanks for your explanations. FYI, I did a test with Kubeflow 1.2. Everything looks good but I get an error " Maybe this error is because I kustomized cluster-local-gateway from base_v3 ? |
|
Humm, after a while (several minutes) the error above disappeared. Everything is green |
|
Thanks! base_v3 is correct |
|
I'll fix the test infra failure before merging this PR |
|
Hi @jal06, I think the PR is not the idiomatic way to install cluster-local-gateway with istio/asm (anthos service mesh). Because looking at https://github.com/knative/docs/blob/master/docs/install/installing-istio.md#installing-istio-without-sidecar-injection (strange that it's different from https://knative.dev/docs/install/installing-istio/#installing-istio-without-sidecar-injection), This seems to be the correct approach when installing istio using operator. Similarly, we are installing asm using the operator per definition in https://github.com/kubeflow/manifests/blob/master/gcp/v2/asm/istio-operator.yaml. and I suspect that installing cluster-local-gateway using kubeflow/manifests installed a gateway with old istio versions not designed for ASM, that's why it fails IAP authentication in your later experimentation. |
|
but a problem I realized is that, asm installation is at 1.4 version currently, and in that version istio was using a different spec for istio operator definition file. I think we should probably first figure out asm upgrade path and directly use the latest format. |
|
@Bobgy, thanks for your feedback. Do you think it will be possible to upgrade asm and set the idiomatic way to install cluster-local-gateway for the next version of Kubeflow (1.3 ) ? About asm version, I confirm I am using 1.4.10 (the recommended version in the documentation). BTW, when trying to debug kfserving, I realised that Kiali could help a lot; but Kiali is not installed by default. Is it possible to add Kiali by default in the manifests ? |
Yes, at least upgrading asm will be on the roadmap, and it should be a lot easier to add |
|
For Kiali, it sounds like an interesting tool to use. I haven't tried myself. In general, I think we'll only provide the minimal to let people run Kubeflow, they can choose to add tools they like |
|
@Bobgy, about Kiali, what you propose sounds relevant with the new policy of addons integration in Istio project : https://istio.io/latest/blog/2020/addon-rework/ Thanks !!! |
|
Let's close this for now and I'll follow up during next release. |
|
@Bobgy: "Let's close this for now and I'll follow up during next release." I deployed KF 1.3 using gcp-blueprints on GCP with IAP and am having a hard time trying to get anything kfserving (both from inside and outside the cluster) working. Is the cluster-local-gateway still required? |
|
/cc @zijianjoy |
Hello @edi-bice-by , there are quite some changes on KFServing and its dependencies. KNative Serving has been upgraded to 0.22.0 to support KFServing, see requirement: https://github.com/kubeflow/kfserving#prerequisites. As the link described, |
|
@zijianjoy yes, thank you, I had already observed the difference in naming and modified accordingly, though was surprised that the blueprint which sources precisely just that combination described in the documentation is not doing the correct thing in the first place. I'm still unable to query any of the kfserving gcp_iap samples (flower or sklearn) externally. More concerning, hence the post here, is that I cannot seem to be able to resolve hostnames (and query kfserving endpoints) from within the cluster either. |
|
Although it is out-of-date, you might be able to find some useful information about querying KFServing endpoint using this sample: https://github.com/kubeflow/kfserving/tree/master/docs/samples/gcp-iap. For my attempt to make this endpoint available externally, see #209 (comment). More specifically, I made relatively big change in this file for authorization https://github.com/kubeflow/kubeflow/blob/master/docs/gke/iap_request.py. The way I made the change is by creating desktop app client ID and client secret: https://cloud.google.com/iap/docs/authentication-howto#authenticating_from_a_desktop_app. |
For solving issue 176