diff --git a/Changelog.md b/Changelog.md index 28cfe86ed52d084f4d455cc73d8e7fe9e7733925..302a857eb0d972a3c1e0301416accc79d750395e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Changelog +## [1.3.1] - 2019-02-21 +### Added +* new option `--timeout` + ## [1.3.0] - 2019-01-12 ### Added * new option `--build-context` diff --git a/Readme.md b/Readme.md index 1b1aef8eecf34aa38898bc8b85352894a7b17b1b..b79cb16e0467356cb796ae588ce5ea05ae7172bf 100644 --- a/Readme.md +++ b/Readme.md @@ -113,6 +113,7 @@ From now on charts located in this repository can be deployed by using the `--ch * `--values`: overrides the values from `Values.yaml` in the helm-charts with values in the specified YAML file. May be provided multiple times. * `--set`: overrides the values from `Values.yaml` in the helm-charts. Provide multiple `--set`-options if you want to provide multiple overrides. * `--set-string`: overrides the values from `Values.yaml` in the helm-charts as string. Provide multiple `--set-string`-options if you want to provide multiple overrides. +* `--timeout`: sets the timeout for helm. defaults to `60` seconds. ## docker undeploy diff --git a/assets/deployer b/assets/deployer index f34f20dd39b5abb7f3a1be5d7e1d7cf98f15c7d0..6ebe4b32c2f9c658c735393b00c39f676fed4bd1 100755 --- a/assets/deployer +++ b/assets/deployer @@ -22,6 +22,7 @@ cluster_url="" service_account="" repo_url="" build_context="." +timeout="60" ! getopt --test > /dev/null if [[ ${PIPESTATUS[0]} -ne 4 ]]; then @@ -30,7 +31,7 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then fi OPTIONS= -LONGOPTS=docker-config:,tag:,build-arg:,values:,set:,set-string:,charts:,name:,token:,certificate-authority:,namespace:,cluster-url:,service-account:,output:,input:,repo-url:,build-context: +LONGOPTS=docker-config:,tag:,build-arg:,values:,set:,set-string:,charts:,name:,token:,certificate-authority:,namespace:,cluster-url:,service-account:,output:,input:,repo-url:,build-context:,timeout: # -use ! and PIPESTATUS to get exit code with errexit set # -temporarily store output to be able to check for errors @@ -104,6 +105,10 @@ while true; do build_context="$2" shift 2 ;; + --timeout) + timeout="$2" + shift 2 + ;; --) shift break @@ -274,7 +279,7 @@ helm_deploy() { fi helmargs=$(echo -e "$helmargs" | sed -E 's/(^[[:space:]]*)|([[:space:]]*$)//g') - cmd="helm upgrade --install --wait --timeout=60 --tiller-namespace=${namespace}" + cmd="helm upgrade --install --wait --timeout=${timeout} --tiller-namespace=${namespace}" cmd="$cmd --namespace=${namespace} --recreate-pods ${name} ${charts} ${helmargs}" out=`$cmd 2>&1` diff --git a/docker-compose.yml b/docker-compose.yml index 2f61d5bc73ee240c0900a09db30429b22e4b0886..0aee591782976305ed716f8ac777374ffeb2169e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,7 +53,7 @@ services: - docker environment: DOCKER_HOST: tcp://docker:2375 - command: deployer deploy --namespace test --cluster-url https://172.18.85.125:6443 --certificate-authority ${ca_cert} --token ${token} --service-account test --name testdeploy --charts ./examplechart --set image.tag=stable + command: deployer deploy --namespace test --cluster-url https://172.18.85.125:6443 --certificate-authority ${ca_cert} --token ${token} --service-account test --name testdeploy --charts ./examplechart --set image.tag=stable --timeout 120 deploy-without-ca: build: .