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

Commit

Permalink
add simple helm plugin support (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Gray authored and msiegenthaler committed Mar 7, 2019
1 parent 31a5d13 commit c39fb34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resource_types:
* `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).
* `plugins`: *Optional.* Array of Helm plugins to install, each defined as an object with properties `url` (required), `version` (optional).
* `helm_host`: *Optional* Address of Tiller. Skips helm discovery process. (only applies if `helm_init_server` is false).
* `tls_enabled`: *Optional* Uses TLS for all interactions with Tiller. (Default: false)
* `helm_ca`: *Optional* Private CA that is used to issue certificates for Tiller clients and servers (only applies if tls_enabled is true).
Expand Down
11 changes: 11 additions & 0 deletions assets/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,20 @@ wait_for_service_up() {

setup_repos() {
repos=$(jq -c '(try .source.repos[] catch [][])' < $1)
plugins=$(jq -c '(try .source.plugins[] catch [][])' < $1)
tiller_namespace=$(jq -r '.source.tiller_namespace // "kube-system"' < $1)

local IFS=$'\n'

for pl in $plugins; do
plurl=$(echo $pl | jq -cr '.url')
plversion=$(echo $pl | jq -cr '.version // ""')
if [ -n "$plversison" ]; then
plversionflag="--version $plversion"
fi
helm plugin install $plurl $plversionflag
done

for r in $repos; do
name=$(echo $r | jq -r '.name')
url=$(echo $r | jq -r '.url')
Expand Down

0 comments on commit c39fb34

Please sign in to comment.