From 87dad2b232ee56d48d63c1a63507ceb4a0631a47 Mon Sep 17 00:00:00 2001 From: Thulio Ferraz Assis Date: Thu, 30 Jul 2020 17:55:06 -0500 Subject: [PATCH] feat: deploy Minibroker for Cloud Foundry (#95) * feat: deploy Minibroker for Cloud Foundry Signed-off-by: Thulio Ferraz Assis * fix: use single script to deploy Signed-off-by: Thulio Ferraz Assis * fix: conditional xtrace for deploy script Co-authored-by: Mark Yen <3977982+mook-as@users.noreply.github.com> Co-authored-by: Mark Yen <3977982+mook-as@users.noreply.github.com> --- Makefile | 10 ++++++++++ build/deploy.sh | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e66de1fc..bf76c118 100644 --- a/Makefile +++ b/Makefile @@ -91,8 +91,18 @@ deploy: OUTPUT_CHARTS_DIR="$(OUTPUT_CHARTS_DIR)" \ ./build/deploy.sh +deploy-cf: + IMAGE="$(IMAGE)" \ + TAG="$(TAG)" \ + IMAGE_PULL_POLICY="$(IMAGE_PULL_POLICY)" \ + OUTPUT_CHARTS_DIR="$(OUTPUT_CHARTS_DIR)" \ + CLOUDFOUNDRY=true \ + ./build/deploy.sh + deploy-dev: image-in-minikube charts deploy +deploy-dev-cf: image-in-minikube charts deploy-cf + release: clean release-images release-charts release-images: image diff --git a/build/deploy.sh b/build/deploy.sh index 4d3382e3..abccdc1a 100755 --- a/build/deploy.sh +++ b/build/deploy.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -o nounset -o pipefail +set -o errexit -o nounset -o pipefail ${XTRACE:+-o xtrace} until svcat version | grep -m 1 'Server Version: v' ; do sleep 1; @@ -26,11 +26,12 @@ fi helm upgrade minibroker \ --install \ - --recreate-pods \ --namespace minibroker \ --wait \ --set "image=${IMAGE}:${TAG}" \ --set "imagePullPolicy=${IMAGE_PULL_POLICY}" \ --set "deploymentStrategy=Recreate" \ --set "logLevel=${LOG_LEVEL:-4}" \ + ${CLOUDFOUNDRY:+--set "deployServiceCatalog=false"} \ + ${CLOUDFOUNDRY:+--set "defaultNamespace=minibroker"} \ "${OUTPUT_CHARTS_DIR}/minibroker-${TAG}.tgz"