Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
allow to set history-max option (#98)
Browse files Browse the repository at this point in the history
in order to limit the maximum number of revisions kept
  • Loading branch information
tillkahlbrock authored and msiegenthaler committed Nov 23, 2018
1 parent c733d9f commit 4646b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource_types:
* `release`: *Optional.* Name of the release (not a file, a string). (Default: autogenerated by helm)
* `namespace`: *Optional.* Kubernetes namespace the chart will be installed into. (Default: default)
* `helm_init_server`: *Optional.* Installs helm into the cluster if not already installed. (Default: false)
* `helm_history_max`: *Optional.* Limits the maximum number of revisions. (Default: 0 = no limit)
* `tiller_namespace`: *Optional.* Kubernetes namespace where tiller is running (or will be installed to). (Default: kube-system)
* `tiller_service_account`: *Optional* Name of the service account that tiller will use (only applies if helm_init_server is true).
* `repos`: *Optional.* Array of Helm repositories to initialize, each repository is defined as an object with properties `name`, `url` (required) username and password (optional).
Expand Down
5 changes: 3 additions & 2 deletions assets/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ setup_helm() {
init_server=$(jq -r '.source.helm_init_server // "false"' < $1)
tiller_namespace=$(jq -r '.source.tiller_namespace // "kube-system"' < $1)
tls_enabled=$(jq -r '.source.tls_enabled // "false"' < $payload)
history_max=$(jq -r '.source.helm_history_max // "0"' < $1)
if [ "$init_server" = true ]; then
tiller_service_account=$(jq -r '.source.tiller_service_account // "default"' < $1)
if [ "$tls_enabled" = true ]; then
Expand All @@ -95,9 +96,9 @@ setup_helm() {
helm_ca_cert_path="/root/.helm/ca.pem"
echo "$tiller_key" > $tiller_key_path
echo "$tiller_cert" > $tiller_cert_path
helm init --tiller-tls --tiller-tls-cert $tiller_cert_path --tiller-tls-key $tiller_key_path --tiller-tls-verify --tls-ca-cert $tiller_key_path --tiller-namespace=$tiller_namespace --service-account=$tiller_service_account --upgrade
helm init --tiller-tls --tiller-tls-cert $tiller_cert_path --tiller-tls-key $tiller_key_path --tiller-tls-verify --tls-ca-cert $tiller_key_path --tiller-namespace=$tiller_namespace --service-account=$tiller_service_account --history-max=$history_max --upgrade
else
helm init --tiller-namespace=$tiller_namespace --service-account=$tiller_service_account --upgrade
helm init --tiller-namespace=$tiller_namespace --service-account=$tiller_service_account --history-max=$history_max --upgrade
fi
wait_for_service_up tiller-deploy 10
else
Expand Down

0 comments on commit 4646b95

Please sign in to comment.