diff --git a/experimental/custom-metrics-api/gencerts.sh b/experimental/custom-metrics-api/gencerts.sh index b1e16031..a8f5539d 100755 --- a/experimental/custom-metrics-api/gencerts.sh +++ b/experimental/custom-metrics-api/gencerts.sh @@ -1,4 +1,10 @@ #!/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 # Detect if we are on mac or should use GNU base64 options case $(uname) in diff --git a/hack/example-service-monitoring/deploy b/hack/example-service-monitoring/deploy index 4912dd96..0c7cd7c1 100755 --- a/hack/example-service-monitoring/deploy +++ b/hack/example-service-monitoring/deploy @@ -1,3 +1,9 @@ #!/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 kubectl apply -f examples/example-app diff --git a/hack/example-service-monitoring/teardown b/hack/example-service-monitoring/teardown index 62b546de..1a49f462 100755 --- a/hack/example-service-monitoring/teardown +++ b/hack/example-service-monitoring/teardown @@ -1,3 +1,9 @@ #!/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 kubectl delete -f examples/example-app