diff --git a/environments/chaos-mesh/devspace.yaml b/environments/chaos-mesh/devspace.yaml new file mode 100644 index 0000000..991bd2d --- /dev/null +++ b/environments/chaos-mesh/devspace.yaml @@ -0,0 +1,21 @@ +version: v1beta11 + +require: + devspace: '>= 5.0, < 6.0' + +commands: + - name: start + command: | + helm repo add chaos-mesh https://charts.chaos-mesh.org + helm install chaos-mesh --create-namespace -n chaos-testing chaos-mesh/chaos-mesh --set chaosDaemon.runtime=containerd --set chaosDaemon.socketPath=/run/containerd/containerd.sock --version 2.2.2 + + - name: stop + command: | + helm uninstall chaos-testing + + # - name: wait + # command: | + # until kubectl wait --for=condition=available deployment/cert-manager -n cert-manager --timeout=60s 2>/dev/null; do echo -n "." && sleep 2; done + # until kubectl wait --for=condition=available deployment/cert-manager-cainjector -n cert-manager --timeout=60s 2>/dev/null; do echo -n "." && sleep 2; done + # until kubectl wait --for=condition=available deployment/cert-manager-webhook -n cert-manager --timeout=60s 2>/dev/null; do echo -n "." && sleep 2; done + # until kubectl wait --for=condition=established crd/certificates.cert-manager.io --timeout=60s 2>/dev/null; do echo -n "." && sleep 2; done diff --git a/environments/kind/devspace.yaml b/environments/kind/devspace.yaml index f33b62f..3c5bb3e 100644 --- a/environments/kind/devspace.yaml +++ b/environments/kind/devspace.yaml @@ -27,8 +27,17 @@ commands: command: |- set -e kind create cluster --name ${KIND_CLUSTER_NAME} --image kindest/node:${KIND_CLUSTER_VERSION} --config ${KIND_CONFIG} + # remove taint `node-role.kubernetes.io/master:NoSchedule` from all control-plane nodes kubectl taint nodes -l node-role.kubernetes.io/control-plane= node-role.kubernetes.io/master:NoSchedule- + + # TODO: this doesn't work as expected, network still crashes, not all daemonsets.apps are scheduled + # needed to be reworked - maybe exchange kindnet with cannel etc.. + # + # remove toleration * from kindnet to prevent scheduling on edge nodes + # kubectl patch daemonsets.apps -n kube-system kindnet --type=json -p='[{"op": "remove", "path": "/spec/template/spec/tolerations" }]' + # kubectl patch daemonsets.apps -n kube-system kube-proxy --type=json -p='[{"op": "remove", "path": "/spec/template/spec/tolerations/1" }]' + export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME} export KIND_CONFIG=${KIND_CONFIG} devspace run activate diff --git a/environments/mkcert/hack/create-ca-secret.sh b/environments/mkcert/hack/create-ca-secret.sh index 1f5d617..2375725 100755 --- a/environments/mkcert/hack/create-ca-secret.sh +++ b/environments/mkcert/hack/create-ca-secret.sh @@ -5,15 +5,15 @@ set -u if [ "$#" -ne 2 ]; then echo "Illegal number of parameters" echo "create-ca-secret " - exit + exit 1 fi if ! [ -d "${CAROOT}" ]; then echo "Creating self-signed CA $1" mkdir -p ${CAROOT} - mkcert 2>/dev/null + mkcert || true #2>/dev/null fi kubectl -n $2 create secret tls $1 \ --key=${CAROOT}/rootCA-key.pem \ - --cert=${CAROOT}/rootCA.pem 2>/dev/null + --cert=${CAROOT}/rootCA.pem || true #2>/dev/null diff --git a/environments/mkcert/hack/create-cert.sh b/environments/mkcert/hack/create-cert.sh index 2e79e31..771fe3e 100755 --- a/environments/mkcert/hack/create-cert.sh +++ b/environments/mkcert/hack/create-cert.sh @@ -5,7 +5,7 @@ set -u if ! [ "$#" -gt 1 ]; then echo "Illegal number of parameters" echo "create-certificate " - exit + exit 1 fi -mkcert ${@:2} +mkcert ${@:1} || true diff --git a/environments/mkcert/hack/create-client-cert.sh b/environments/mkcert/hack/create-client-cert.sh index 941732a..b1d2f89 100755 --- a/environments/mkcert/hack/create-client-cert.sh +++ b/environments/mkcert/hack/create-client-cert.sh @@ -5,9 +5,8 @@ set -u if ! [ "$#" -gt 1 ]; then echo "Illegal number of parameters" echo "create-certificate " - exit + exit 1 fi echo $CAROOT - -mkcert -client ${@:1} +mkcert -client ${@:1} || true diff --git a/environments/mkcert/hack/init-ca.sh b/environments/mkcert/hack/init-ca.sh index 129d301..147a2b6 100755 --- a/environments/mkcert/hack/init-ca.sh +++ b/environments/mkcert/hack/init-ca.sh @@ -11,7 +11,7 @@ fi if ! [ -d "${CAROOT}" ]; then echo "Creating self-signed CA ${CAROOT}" mkdir -p ${CAROOT} - # mkcert 2>/dev/null + mkcert || true #2>/dev/null else echo "CA ${CAROOT} already exists." fi diff --git a/environments/mkcert/hack/install-ca.sh b/environments/mkcert/hack/install-ca.sh index 102d75b..0668867 100755 --- a/environments/mkcert/hack/install-ca.sh +++ b/environments/mkcert/hack/install-ca.sh @@ -5,8 +5,8 @@ set -u if [ "$#" -ne 0 ]; then echo "Illegal number of parameters" echo "install-ca" - exit + exit 1 fi echo "installing ${CAROOT}" -mkcert -install +mkcert -install || true diff --git a/environments/mkcert/hack/uninstall-ca.sh b/environments/mkcert/hack/uninstall-ca.sh index a5566fc..5058379 100755 --- a/environments/mkcert/hack/uninstall-ca.sh +++ b/environments/mkcert/hack/uninstall-ca.sh @@ -5,7 +5,7 @@ set -u if [ "$#" -ne 0 ]; then echo "Illegal number of parameters" echo "uninstall-ca" - exit + exit 1 fi echo "uninstalling ${CAROOT}"