-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run kubernetes integration tests inside of a pod and use kind to setu…
…p a kubernetes cluster (#17656) * Use kind to bring up a local kubernetes cluster and then run the integration tests against the kind cluster. * Run mage update. * Add more tests. * Fix more tests, install kind in prepare-tests. * Switch to running kubernetes integration tests inside of Kubernetes. * Use golang 1.13.9. * Fix for other beats. * Run mage fmt. * Don't run kubernetes integration tests if not inside kubernetes environment. * Fix metricbeat to use mage and the makefile shim for mage. * Improve the error message when kind or kubectl is not available. * Refactor the integration tests into a more module system. * Fix go vet. * Setup travis to use kind. * Run kubernetes integration tests in Jenkins. * Fix filebeat magefile. * Fix travis and Jenkins. * Check requirements of the test runner before actually running the tests. * Add return on parsebool error. * Don't return err on missing requirements for tester. * Run make update. * Move the kubernetes items to its own module, import that module only by metricbeat.
- Loading branch information
1 parent
1d85b30
commit db29874
Showing
130 changed files
with
25,780 additions
and
470 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
|
||
MSG="parameter missing." | ||
DEFAULT_HOME="/usr/local" | ||
KIND_VERSION=${KIND_VERSION:?$MSG} | ||
HOME=${HOME:?$DEFAULT_HOME} | ||
KIND_CMD="${HOME}/bin/kind" | ||
|
||
mkdir -p "${HOME}/bin" | ||
|
||
curl -sSLo "${KIND_CMD}" "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64" | ||
chmod +x "${KIND_CMD}" |
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,14 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
|
||
MSG="parameter missing." | ||
DEFAULT_HOME="/usr/local" | ||
K8S_VERSION=${K8S_VERSION:?$MSG} | ||
HOME=${HOME:?$DEFAULT_HOME} | ||
KUBECTL_CMD="${HOME}/bin/kubectl" | ||
|
||
mkdir -p "${HOME}/bin" | ||
|
||
curl -sSLo "${KUBECTL_CMD}" "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl" | ||
chmod +x "${KUBECTL_CMD}" | ||
|
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,18 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
|
||
MSG="parameter missing." | ||
K8S_VERSION=${K8S_VERSION:?$MSG} | ||
HOME=${HOME:?$MSG} | ||
KBC_CMD="${HOME}/bin/kubectl" | ||
|
||
mkdir -p "${HOME}/bin" | ||
|
||
curl -sSLo "${KBC_CMD}" "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl" | ||
chmod +x "${KBC_CMD}" | ||
|
||
GO111MODULE="on" go get sigs.k8s.io/kind@v0.5.1 | ||
kind create cluster --image kindest/node:${K8S_VERSION} | ||
|
||
export KUBECONFIG="$(kind get kubeconfig-path)" | ||
kubectl cluster-info |
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
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
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
Oops, something went wrong.