-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use kind release from GitHub instead of 'go get sigs.k8s.io/kind' * Run ct container with '--network host' to avoid patching kubeconfig * Create multi-node cluster with one master and three worker nodes so pods with anti-affinity can be tested * Improve wait logic to cater for multiple nodes * Add log statements * Remote unnecessary 'k8s' remote to avoid confusion * Extract function for 'docker exec' calls Signed-off-by: Reinhard Nägele <[email protected]>
- Loading branch information
1 parent
868038e
commit 329d0ba
Showing
5 changed files
with
91 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,47 +1,32 @@ | ||
version: 2 | ||
version: 2.1 | ||
jobs: | ||
lint-scripts: | ||
docker: | ||
- image: koalaman/shellcheck-alpine | ||
steps: | ||
- checkout | ||
- run: | ||
name: lint | ||
command: | | ||
shellcheck -x test/e2e-kind.sh | ||
command: shellcheck -x test/e2e-kind.sh | ||
|
||
lint-charts: | ||
docker: | ||
- image: quay.io/helmpack/chart-testing:v2.2.0 | ||
steps: | ||
- checkout | ||
- run: | ||
name: lint | ||
command: | | ||
git remote add k8s https://github.com/your_git_repo/charts | ||
git fetch k8s master | ||
ct lint --config test/ct.yaml | ||
command: ct lint --config test/ct.yaml | ||
|
||
install-charts: | ||
machine: true | ||
environment: | ||
CHART_TESTING_IMAGE: quay.io/helmpack/chart-testing | ||
CHART_TESTING_TAG: v2.2.0 | ||
CHARTS_REPO: https://github.com/your_git_repo/charts | ||
K8S_VERSION: "v1.12.3" | ||
steps: | ||
- checkout | ||
- run: | ||
name: install | ||
command: | | ||
test/e2e-kind.sh | ||
no_output_timeout: 3600 | ||
command: test/e2e-kind.sh | ||
|
||
workflows: | ||
version: 2 | ||
lint_and_install: | ||
untagged-build: | ||
jobs: | ||
- lint-scripts | ||
- lint-charts: | ||
requires: | ||
- lint-scripts | ||
- install-charts: | ||
requires: | ||
- lint-charts | ||
- lint-charts | ||
- install-charts |
This file contains 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Chart testing example with CircleCi and kind - `k`ubernetes `in` `d`ocker | ||
# Chart testing example with CircleCi and kind - `K`ubernetes `in` `D`ocker | ||
|
||
This example shows how to lint and test charts using CircleCi and [kind](https://github.com/kubernetes-sigs/kind). | ||
`kind` is a tool for running local Kubernetes clusters using Docker container "nodes". | ||
|
||
`kind` is a tool for running local/CI pipelines Kubernetes clusters using Docker container "nodes". | ||
This example shows how to lint and test charts using CircleCi and [kind](https://github.com/kubernetes-sigs/kind). | ||
It creates a cluster with a single master node and three worker nodes. | ||
The cluster configuration can be adjusted in [kind-config.yaml](test/kind-config.yaml). |
This file contains 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 |
---|---|---|
@@ -1,7 +1 @@ | ||
remote: k8s | ||
target-branch: master | ||
chart-dirs: | ||
- stable | ||
excluded-charts: | ||
- common | ||
helm-extra-args: --timeout 800 |
This file contains 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 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,6 @@ | ||
kind: Config | ||
apiVersion: kind.sigs.k8s.io/v1alpha2 | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
replicas: 3 |