-
Notifications
You must be signed in to change notification settings - Fork 75
Run upstream e2e test with net-istio #1014
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -153,12 +153,57 @@ function deploy_knativeserving_cr { | |||
| # This is a way to test backwards compatibility of the product with the older full-blown configuration. | ||||
| oc apply -n "${SERVING_NAMESPACE}" -f "${rootdir}/test/v1alpha1/resources/operator.knative.dev_v1alpha1_knativeserving_cr.yaml" | ||||
|
|
||||
| if [[ $FULL_MESH == "true" ]]; then | ||||
| enable_net_istio | ||||
| fi | ||||
|
|
||||
| timeout 900 "[[ \$(oc get knativeserving.operator.knative.dev knative-serving \ | ||||
| -n ${SERVING_NAMESPACE} -o=jsonpath='{.status.conditions[?(@.type==\"Ready\")].status}') != True ]]" | ||||
|
|
||||
| logger.success 'Knative Serving has been installed successfully.' | ||||
| } | ||||
|
|
||||
| # enable_net_istio adds patch to KnativeServing: | ||||
| # - Set ingress.istio.enbled to "true" | ||||
| # - Set inject and rewriteAppHTTPProbers annotations for activator and autoscaler | ||||
| # - Override observability.metrics.backend-destination to "none", | ||||
| # as "test/v1alpha1/resources/operator.knative.dev_v1alpha1_knativeserving_cr.yaml" has the value "prometheus". | ||||
| function enable_net_istio { | ||||
| patchfile="$(mktemp -t knative-serving-XXXXX.yaml)" | ||||
| cat - << EOF > "${patchfile}" | ||||
| spec: | ||||
| ingress: | ||||
| istio: | ||||
| enabled: true | ||||
| deployments: | ||||
| - annotations: | ||||
| sidecar.istio.io/inject: "true" | ||||
| sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||||
| name: activator | ||||
| - annotations: | ||||
| sidecar.istio.io/inject: "true" | ||||
| sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||||
| name: autoscaler | ||||
| - name: domain-mapping | ||||
| replicas: 2 | ||||
| config: | ||||
| observability: | ||||
| metrics.backend-destination: "none" | ||||
|
Comment on lines
+189
to
+191
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this required? Don't we do that "automatically"?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Umm... we have the default as serverless-operator/test/v1alpha1/resources/operator.knative.dev_v1alpha1_knativeserving_cr.yaml Line 39 in b368a3f
so I think we need to override it with none. Sorry if I misunderstood the meaning of "automatically".
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahhhh we explicitly set it. Nevermind then, I was thinking in our Golang code, where we default to |
||||
| EOF | ||||
|
|
||||
| oc patch knativeserving knative-serving \ | ||||
| -n "${SERVING_NAMESPACE}" \ | ||||
| --type merge --patch-file="${patchfile}" | ||||
|
|
||||
| timeout 900 "[[ \$(oc get knativeserving.operator.knative.dev knative-serving \ | ||||
| -n ${SERVING_NAMESPACE} -o=jsonpath='{.status.conditions[?(@.type==\"Ready\")].status}') != True ]]" | ||||
|
|
||||
| logger.success 'KnativeServing has been updated successfully.' | ||||
|
|
||||
| # metadata-webhook adds istio annotations for e2e test by webhook. | ||||
| oc apply -f https://raw.githubusercontent.com/nak3/metadata-webhook/main/examples/release.yaml | ||||
| } | ||||
|
|
||||
| function deploy_knativeeventing_cr { | ||||
| logger.info 'Deploy Knative Eventing' | ||||
|
|
||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,11 +48,27 @@ function upstream_knative_serving_e2e_and_conformance_tests { | |
| image_template="registry.ci.openshift.org/openshift/knative-${KNATIVE_SERVING_VERSION}:knative-serving-test-{{.Name}}" | ||
| OPENSHIFT_TEST_OPTIONS="--kubeconfig $KUBECONFIG --enable-beta --enable-alpha --resolvabledomain" | ||
|
|
||
| if [[ $FULL_MESH == "true" ]]; then | ||
| subdomain=$(oc get ingresses.config.openshift.io cluster -o jsonpath="{.spec.domain}") | ||
| OPENSHIFT_TEST_OPTIONS+=" --https --customdomain=$subdomain" | ||
|
|
||
| # Use x509ignoreCN=0. | ||
| # This should not be necesssary if we could ceate certs with SAN. However, openssl command in the CI | ||
| # seems old version and so it does not have "-addext" option to add SAN. | ||
| export GODEBUG="x509ignoreCN=0" | ||
|
Comment on lines
+55
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be able to fix that. Can we update the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried but the base image of |
||
|
|
||
| # TODO: SRVKS-211: Can not run grpc and http2 tests. | ||
| rm ./test/e2e/grpc_test.go | ||
| rm ./test/e2e/http2_test.go | ||
| # Remove h2c test | ||
| sed -ie '46,50d' ./test/conformance/runtime/protocol_test.go | ||
|
Comment on lines
+60
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This means that we'll have to document gRPC/HTTP2 not working for mesh for now, right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I will open the JIRA. |
||
| fi | ||
|
|
||
| local parallel=3 | ||
|
|
||
| if [[ $(oc get infrastructure cluster -ojsonpath='{.status.platform}') = VSphere ]]; then | ||
| # Since we don't have LoadBalancers working, gRPC tests will always fail. | ||
| rm ./test/e2e/grpc_test.go | ||
| rm -f ./test/e2e/grpc_test.go | ||
| parallel=2 | ||
| fi | ||
|
|
||
|
|
||
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.
Why do we need this? Don't we also need that in "usual" setups?
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, we have the
replicas: 2in "usual" setups.serverless-operator/test/v1alpha1/resources/operator.knative.dev_v1alpha1_knativeserving_cr.yaml
Lines 7 to 8 in b368a3f
But the
spec.deploymentsis an array. So when we patch the annotation (inject and rewriteAppHTTPProbers) tospec.deploymentsfor activator and autoscaler, domain-mapping'sreplicas: 2is dropped 😓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.
Gotcha, makes sense!