-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add e2e test to verify knative examples #1250
Conversation
/test pull-tekton-triggers-integration-tests |
1 similar comment
/test pull-tekton-triggers-integration-tests |
3099601
to
be5b6e8
Compare
/test pull-tekton-triggers-integration-tests |
0878a6c
to
b706ade
Compare
/test pull-tekton-triggers-integration-tests |
1 similar comment
/test pull-tekton-triggers-integration-tests |
b706ade
to
24740e0
Compare
test/e2e-test-knative-examples.sh
Outdated
kubectl apply -f https://github.com/knative/serving/releases/download/v0.26.0/serving-crds.yaml | ||
kubectl apply -f https://github.com/knative/serving/releases/download/v0.26.0/serving-core.yaml | ||
|
||
kubectl apply -f https://github.com/knative/net-kourier/releases/download/v0.26.0/kourier.yaml | ||
|
||
kubectl patch configmap/config-network \ | ||
--namespace knative-serving \ | ||
--type merge \ | ||
--patch '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}' | ||
|
||
# To configure Magic DNS to access Knative Service. | ||
kubectl apply -f https://github.com/knative/serving/releases/download/v0.26.0/serving-default-domain.yaml | ||
|
||
# Wait for pods to be running in the namespaces we are deploying to | ||
wait_until_pods_running knative-serving || fail_test "Knative Serving did not come up" | ||
# Wait for jobs to be completed in the namespaces we are deploying to | ||
wait_until_batch_job_complete knative-serving || fail_test "Knative Serving jobs did not completed" |
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.
@mattmoor I m installing Knative Serving following installation doc and i see one issue that default-domain
job is not going to completed state am i doing something wrong here 🤔
Tried samething on GCP cluster locally and it worked (default-domain
job went to completed state).
Any pointers would be grateful 🙏
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.
Depends on the system you are using. For instance on KinD you need metallb for this stuff to work.
Can you share more about how it is failing?
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.
CI is failing with below error
++ kubectl get jobs -n knative-serving --no-headers '-ocustom-columns=n:{.metadata.name},c:{.spec.completions},s:{.status.succeeded}'
+ local 'jobs=default-domain 1 <none>'
++ echo 'default-domain 1 <none>'
++ awk '{if ($2!=$3) print $0}'
++ wc -l
+ local not_complete=1
+ [[ 1 -eq 0 ]]
+ echo -n .
.+ sleep 2
+ echo -e '\n\nERROR: timeout waiting for jobs to complete\ndefault-domain 1 <none>'
ERROR: timeout waiting for jobs to complete
default-domain 1 <none>
+ return 1
+ fail_test 'Knative Serving jobs did not completed'
because i am using below function to wait until jobs are completed
wait_until_batch_job_complete knative-serving || fail_test "Knative Serving jobs did not completed"
Now i have doubt that does our CI cluster will have loadbalancer attached 🤔
/cc @dibyom
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.
when i install on mu local GKE cluster where loadbalancer is attached the default-domain pod goes to completed state by using the public ip
Logs:
kubectl logs -f default-domain-nq8lk -n knative-serving
W1027 06:07:37.953764 1 client_config.go:615] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
{"level":"info","ts":1635314868.1755047,"logger":"fallback.default-domain","caller":"default-domain/main.go:225","msg":"Updated default domain to: 34.66.182.202.sslip.io"}
47bbdd0
to
007767a
Compare
acffc83
to
cd4694e
Compare
Hi @dibyom could you take a look at this PR please |
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.
Thanks @savitaashture Looks good overall. My main comment is can we this logic into e2e-test-examples.sh itself instead of creating a new file and copying stuff over? i.e. we can add in a couple of new functions in that file itself (curl_knative_service
, install_knative_serving
) and then add a new function called run_knative_tests
that is basically the main
from this file?
test/e2e-test-knative-examples.sh
Outdated
curl -v \ | ||
-H 'X-GitHub-Event: pull_request' \ | ||
-H 'X-Hub-Signature: sha1=ba0cdc263b3492a74b601d240c27efe81c4720cb' \ | ||
-H 'Content-Type: application/json' \ |
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.
Can we put this in a curl.sh file like we do for other examples.
cd4694e
to
e8d6d6b
Compare
e8d6d6b
to
66937aa
Compare
/test pull-tekton-triggers-integration-tests |
1 similar comment
/test pull-tekton-triggers-integration-tests |
@dibyom I have addressed comments PTAL |
Looks good. Thanks! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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:
Approvers can indicate their approval by writing |
Changes
Fixes #1089
PR adds changes to install Knative Serving and runs
custom-resource
examples for bothv1alpha1
andv1beta1
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes