diff --git a/spring-cloud-dataflow-docs/src/main/asciidoc/appendix-local-k8s-development.adoc b/spring-cloud-dataflow-docs/src/main/asciidoc/appendix-local-k8s-development.adoc index 2ab393c3df..42914bf2ee 100644 --- a/spring-cloud-dataflow-docs/src/main/asciidoc/appendix-local-k8s-development.adoc +++ b/spring-cloud-dataflow-docs/src/main/asciidoc/appendix-local-k8s-development.adoc @@ -78,7 +78,7 @@ Since these scripts export environmental variable they need to be executes as in [source,shell] .... -source ./k8s/use-mk-docker.sh test-ns postgresql rabbitmq +source ./k8s/use-mk-docker.sh postgresql rabbitmq --namespace test-ns .... ===== TMC or GKE Cluster in Cloud diff --git a/src/deploy/k8s/set-ver.sh b/src/deploy/k8s/set-ver.sh index 6acf88c510..927a207610 100755 --- a/src/deploy/k8s/set-ver.sh +++ b/src/deploy/k8s/set-ver.sh @@ -64,6 +64,9 @@ while [ "$1" != "" ]; do shift done echo "Namespace: $NS" +if [ "$NS" = "" ]; then + NS=scdf +fi export NS if [ "$BROKER" != "" ]; then echo "BROKER: $BROKER" diff --git a/src/deploy/k8s/use-mk-docker.sh b/src/deploy/k8s/use-mk-docker.sh index 870436686a..3770a7a2cc 100755 --- a/src/deploy/k8s/use-mk-docker.sh +++ b/src/deploy/k8s/use-mk-docker.sh @@ -1,14 +1,10 @@ #!/usr/bin/env bash -(return 0 2>/dev/null) && sourced=1 || sourced=0 -if [ "$sourced" = "0" ]; then - echo "This script must be invoked using: source $0 $*" - exit 1 -fi if [ -z "$BASH_VERSION" ]; then - echo "This script requires Bash. Use: bash $0 $*" - exit 0 + echo "This script requires Bash. For example:\n bash \n $0 $*" +else + echo "Setting variables" + SCDIR=$(readlink -f "${BASH_SOURCE[0]}") + SCDIR=$(dirname "$SCDIR") + SCDIR=$(realpath $SCDIR) + source $SCDIR/use-mk.sh docker $* fi -SCDIR=$(readlink -f "${BASH_SOURCE[0]}") -SCDIR=$(dirname "$SCDIR") -SCDIR=$(realpath $SCDIR) -source $SCDIR/use-mk.sh docker $*