* Avoid race condition when deploying quickstart example The namespace and CRD creation must happen before any dependent objects are created. So we can put these in a separate directory (manifest/setup) so they can be created before the other objects. Some minor updates to the README and added a couple of scripts for the quickstarts Update travis script to avoid race condition Signed-off-by: Paul Gier <pgier@redhat.com> * simplify the example quickstart script and improve readme Signed-off-by: Paul Gier <pgier@redhat.com> * increase minikube memory to 6g for quickstart example
29 lines
890 B
Bash
Executable File
29 lines
890 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# exit immediately when a command fails
|
|
set -e
|
|
# only exit with zero if all commands of the pipeline exit successfully
|
|
set -o pipefail
|
|
# error on unset variables
|
|
set -u
|
|
# print each command before executing it
|
|
set -x
|
|
|
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
|
chmod +x kubectl
|
|
curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/v0.4.0/kind-linux-amd64
|
|
chmod +x kind
|
|
|
|
./kind create cluster
|
|
export KUBECONFIG="$(./kind get kubeconfig-path)"
|
|
|
|
# create namespace, permissions, and CRDs
|
|
./kubectl create -f manifests/setup
|
|
|
|
# wait for CRD creation to complete
|
|
until ./kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
|
|
|
|
# create monitoring components
|
|
./kubectl create -f manifests/
|
|
|
|
make test-e2e
|