-
Notifications
You must be signed in to change notification settings - Fork 334
CNI Accptance test on Kind #1445
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8ef2c28
Add CNI acceptance tests on Kind
curtbushko e49970c
missed setting cni.enabled for one mesh test
curtbushko be0ad22
fix lint
curtbushko e9d029e
missed the resource increase bats test for cni-daemonset
curtbushko 691f10a
revert a line in circle ci config
curtbushko b95c83c
Add CNI Kind tests to test-and-build, remove unneeded sleeps, remove …
curtbushko bce75ed
disable for tests that do no use connectInject.enabled
curtbushko a3814e2
use a separate target for test-and-build for acceptance-tproxy-cni
curtbushko 92ab438
check-in the calico yaml files because calicos website is unstable
curtbushko d3feb5e
turn on nightly schedules and the rest of the jobs
curtbushko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,6 @@ commands: | |
| wget https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz | ||
| tar -zxvf helm-v3.7.0-linux-amd64.tar.gz | ||
| sudo mv linux-amd64/helm /usr/local/bin/helm | ||
|
|
||
| create-kind-clusters: | ||
| parameters: | ||
| version: | ||
|
|
@@ -59,6 +58,18 @@ commands: | |
| command: | | ||
| kind create cluster --name dc1 --image kindest/node:<< parameters.version >> | ||
| kind create cluster --name dc2 --image kindest/node:<< parameters.version >> | ||
| create-kind-cni-clusters: | ||
| parameters: | ||
| version: | ||
| type: string | ||
| steps: | ||
| - run: | ||
| name: Create CNI kind clusters | ||
| command: | | ||
| kind create cluster --config=acceptance/framework/environment/cni-kind/kind.config --name dc1 --image kindest/node:<< parameters.version >> | ||
| make kind-cni-calico | ||
| kind create cluster --config=acceptance/framework/environment/cni-kind/kind.config --name dc2 --image kindest/node:<< parameters.version >> | ||
| make kind-cni-calico | ||
| run-acceptance-tests: | ||
| parameters: | ||
| failfast: | ||
|
|
@@ -547,6 +558,38 @@ jobs: | |
| - store_artifacts: | ||
| path: /tmp/test-results | ||
|
|
||
| acceptance-tproxy-cni: | ||
| environment: | ||
| - TEST_RESULTS: /tmp/test-results | ||
| machine: | ||
| image: ubuntu-2004:202010-01 | ||
| resource_class: xlarge | ||
| parallelism: 6 | ||
| steps: | ||
| - checkout | ||
| - install-prereqs | ||
| - create-kind-clusters: | ||
| version: "v1.22.4" | ||
| - restore_cache: | ||
| keys: | ||
| - consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }} | ||
| - run: | ||
| name: go mod download | ||
| working_directory: *acceptance-mod-path | ||
| command: go mod download | ||
| - save_cache: | ||
| key: consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }} | ||
| paths: | ||
| - ~/.go_workspace/pkg/mod | ||
| - run: mkdir -p $TEST_RESULTS | ||
| - run-acceptance-tests: | ||
| failfast: true | ||
| additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -enable-cni | ||
| - store_test_results: | ||
| path: /tmp/test-results | ||
| - store_artifacts: | ||
| path: /tmp/test-results | ||
|
|
||
| ########################## | ||
| # CLEANUP CLOUD RESOURCES | ||
| ########################## | ||
|
|
@@ -878,6 +921,42 @@ jobs: | |
| fail_only: true | ||
| failure_message: "Acceptance tests against Kind with Kubernetes v1.23 failed. Check the logs at: ${CIRCLE_BUILD_URL}" | ||
|
|
||
| acceptance-kind-cni-1-23: | ||
| parallelism: 6 | ||
| environment: | ||
| - TEST_RESULTS: /tmp/test-results | ||
| machine: | ||
| image: ubuntu-2004:202010-01 | ||
| resource_class: xlarge | ||
| steps: | ||
| - checkout | ||
| - install-prereqs | ||
| - create-kind-cni-clusters: | ||
| version: "v1.23.0" | ||
| - restore_cache: | ||
| keys: | ||
| - consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }} | ||
| - run: | ||
| name: go mod download | ||
| working_directory: *acceptance-mod-path | ||
| command: go mod download | ||
| - save_cache: | ||
| key: consul-helm-modcache-v2-{{ checksum "acceptance/go.mod" }} | ||
| paths: | ||
| - ~/.go_workspace/pkg/mod | ||
| - run: mkdir -p $TEST_RESULTS | ||
| - run-acceptance-tests: | ||
| additional-flags: -use-kind -kubecontext="kind-dc1" -secondary-kubecontext="kind-dc2" -enable-transparent-proxy -enable-cni | ||
| - store_test_results: | ||
| path: /tmp/test-results | ||
| - store_artifacts: | ||
| path: /tmp/test-results | ||
| - slack/status: | ||
| # temporarily sending to #cni-acceptance-tests channel | ||
|
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. Will remove before merge. |
||
| channel: C03V3K0040G | ||
| fail_only: true | ||
| failure_message: "Acceptance tests for CNI against Kind with Kubernetes v1.23 failed. Check the logs at: ${CIRCLE_BUILD_URL}" | ||
|
|
||
| acceptance-kind-1-23-consul-nightly-1-11: | ||
| environment: | ||
| - TEST_RESULTS: /tmp/test-results | ||
|
|
@@ -1007,6 +1086,10 @@ workflows: | |
| context: consul-ci | ||
| requires: | ||
| - dev-upload-docker | ||
| - acceptance-tproxy-cni: | ||
| context: consul-ci | ||
| requires: | ||
| - dev-upload-docker | ||
| - acceptance-tproxy: | ||
| context: consul-ci | ||
| requires: | ||
|
|
@@ -1049,6 +1132,10 @@ workflows: | |
| - acceptance-kind-1-23: | ||
| requires: | ||
| - dev-upload-docker | ||
| - acceptance-kind-cni-1-23: | ||
| requires: | ||
| - dev-upload-docker | ||
|
|
||
|
|
||
| # nightly-acceptance-tests-consul: | ||
| # triggers: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
acceptance/framework/environment/cni-kind/custom-resources.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # This section includes base Calico installation configuration. | ||
| # For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation | ||
| apiVersion: operator.tigera.io/v1 | ||
| kind: Installation | ||
| metadata: | ||
| name: default | ||
| spec: | ||
| # Configures Calico networking. | ||
| calicoNetwork: | ||
| # Note: The ipPools section cannot be modified post-install. | ||
| ipPools: | ||
| - blockSize: 26 | ||
| cidr: 192.168.0.0/16 | ||
| encapsulation: VXLANCrossSubnet | ||
| natOutgoing: Enabled | ||
| nodeSelector: all() | ||
|
|
||
| --- | ||
|
|
||
| # This section configures the Calico API server. | ||
| # For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer | ||
| apiVersion: operator.tigera.io/v1 | ||
| kind: APIServer | ||
| metadata: | ||
| name: default | ||
| spec: {} | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| kind: Cluster | ||
| apiVersion: kind.x-k8s.io/v1alpha4 | ||
| networking: | ||
| # Calicos default subnet. Needed for Calico to run on kind | ||
| podSubnet: 192.168.0.0/16 | ||
| serviceSubnet: 10.110.0.0/16 | ||
| # The default kind.net CNI plugin will not be installed | ||
| disableDefaultCNI: true | ||
| nodes: | ||
| - role: control-plane |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
could we add a job for the
test-and-buildpipeline as well so that it runs on every PR?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.
Done.