fix: add sensible defaults and defensive property references
Additionally deprecate certain duplicated or unnecessary configuration
parameters, such as:
* compute the download URL for helm and kubectl from the configured
version
* remove the tests/pillar/single.sls reference to
helm:client:bind:address
* remove the helm:client:kubectl:tarball_path configuration value,
since that’s an implementation detail of the formula that shouldn’t
matter to consumers
Fixes salt-formulas/salt-formula-helm#2
diff --git a/pillar.example b/pillar.example
new file mode 100644
index 0000000..156b411
--- /dev/null
+++ b/pillar.example
@@ -0,0 +1,163 @@
+helm:
+ client:
+
+ #
+ # The version of the Helm client to install
+ #
+ # version: 2.6.2
+
+ #
+ # The hash for the helm client binary. You must calculate the hash for the
+ # version of the binary you install.
+ # Defaults to the SHA 256 hash for the helm-v2.6.2-linux-amd64.tar.gz
+ #
+ #
+ # The binary is downloaded from:
+ #
+ # https://storage.googleapis.com/kubernetes-helm/helm-v[[ client.version ]]-linux-amd64.tar.gz
+ #
+ # Here is an example command you can use to calculate the sha256 hash for
+ # the binary:
+ #
+ # ```
+ # shasum -a 256 /path/to/helm-v[[ client.version ]]-linux.amd64.tar.gz
+ # ```
+ #
+ # download_hash: sha256=ba807d6017b612a0c63c093a954c7d63918d3e324bdba335d67b7948439dbca8
+
+ #
+ # Whether the helm client should be enabled for the target minion or not
+ #
+ # TODO: this should be removed.
+ #
+ enabled: true
+
+ #
+ # Configurations to manage the cluster's Tiller installation
+ #
+ # tiller:
+ #
+ # Whether Tiller should be deployed to the kubernetes cluster as part of
+ # this formaul. Defaults to true.
+ #
+ # install: true
+
+ #
+ # The namespace to which Tiller should be installed (only used if
+ # `helm:client:tiller:install` is set to true).
+ # Defaults to `kube-system`
+ #
+ # naamespace: kube-system
+
+ #
+ # The host IP or name and port for an existing tiller installation that
+ # should be used by the Helm client. Defaults to Helm's default if
+ # unspecified.
+ #
+ # host:
+
+ #
+ # Configurations defined to manage the target minion's kubectl installation
+ #
+ # kubectl:
+ #
+ # Whether kubectl should be installed as part of this formula.
+ # Defaults to false
+ #
+ # install: false
+
+ #
+ # The version of the kubectl binary to install.
+ # Defaults to 1.6.7
+ #
+ # version: 1.6.7
+
+ #
+ # The hash for the kubectl binary version to install. You must calculate
+ # the hash for the version of the binary you install.
+ #
+ #
+ # The binary is downloaded from:
+ #
+ # https://dl.k8s.io/v[[ client.kubectl.version ]]/kubernetes-client-linux-amd64.tar.gz
+ #
+ #
+ # Defaults to the SHA 256 hash for the Linux distribution of version 1.6.7
+ #
+ # Here is an example command you can use to calculate the sha256 hash for
+ # the binary:
+ #
+ # ```
+ # shasum -a 256 /path/to/kubernetes-client-linux-amd64.tar.gz
+ # ```
+ #
+ # download_hash: sha256=54947ef84181e89f9dbacedd54717cbed5cc7f9c36cb37bc8afc9097648e2c91
+
+
+ #
+ # Configuration parameters that should be applied to the kubectl
+ # installation's kubeconfig. Not that this will only be applied to the
+ # kubectl installation managed by this formula.
+ #
+ # While the kubectl tool can be configured to connect to multiple
+ # clusters and allow switching between cluster contexts, this kubectl
+ # configuration managed by this formula will only be configured with
+ # the cluster context details used by this formula.
+ #
+ # config:
+ # cluster:
+ # server: https://kubernetes.example.com
+ # certificate-authority-data: base64_of_ca_certificate
+ # cluster_name: kubernetes.example
+ # context_name: kubernetes-example
+ # user:
+ # username: admin
+ # password: uberadminpass
+ # user_name: admin
+
+
+ #
+ # The mapping of repository names to urls that should be registered and
+ # kept up-to-date with the helm client
+ #
+ repos:
+ mirantisworkloads: https://mirantisworkloads.storage.googleapis.com/
+ incubator: https://kubernetes-charts-incubator.storage.googleapis.com/
+
+ #
+ # The listing of releases that should be managed by the formula. Note that
+ # if configured, the releases listed under this `helm:client:releases` key
+ # will be used as an authoritative, exclusive listing of the releases that
+ # should be configured and deployed to the Tiller installation; any
+ # release existing in the tiller cluster that is not configured here
+ # **will be deleted**
+ #
+ releases:
+ zoo1:
+
+ #
+ # The name of the release
+ #
+ name: my-zookeeper
+
+ #
+ # The repository name and chart name combination for the chart to
+ # release
+ #
+ chart: mirantisworkloads/zookeeper
+
+ #
+ # The version of the helm chart to install
+ #
+ version: 1.2.0
+
+ #
+ # The namespace to which the release should be deployed
+ #
+ namespace: helm-example-namespace
+
+ #
+ # Configuration values that should be supplied to the chart.
+ #
+ values:
+ logLevel: INFO
\ No newline at end of file