From e5c65f8cd91399888b370550b2868d4732e2a2d5 Mon Sep 17 00:00:00 2001 From: Sean Eagan Date: Fri, 20 Sep 2019 16:51:03 -0500 Subject: [PATCH] Add configuration for tiller storage This adds a parameter to the genesis schema to configure the tiller storage [0] type. For backward compatibility, by default the parameter is not passed to tiller, thus relying on the upstream default, which is 'configmap'. [0]: https://helm.sh/docs/using_helm/#tiller-s-release-information Change-Id: I045f8b57f695385b1a502a8f13f61a58d400784e --- doc/source/configuration/genesis.rst | 28 +++++++++++++++++++ examples/basic/Genesis.yaml | 2 ++ examples/complete/Genesis.yaml | 2 ++ examples/gate/Genesis.yaml | 2 ++ promenade/schemas/Genesis.yaml | 2 ++ .../manifests/bootstrap-armada.yaml | 4 +++ tests/unit/builder_data/simple/Genesis.yaml | 2 ++ 7 files changed, 42 insertions(+) diff --git a/doc/source/configuration/genesis.rst b/doc/source/configuration/genesis.rst index 5273d293..02bdb906 100644 --- a/doc/source/configuration/genesis.rst +++ b/doc/source/configuration/genesis.rst @@ -31,6 +31,7 @@ Here is a complete sample document: tiller: listen: 24134 probe_listen: 24135 + storage: secret labels: static: - calico-etcd=enabled @@ -85,6 +86,30 @@ Configuration for Armada bootstrap metric collection. | | | Can be set to 0 to disable metrics collection. | +-----------------+----------+---------------------------------------------------------------------------------------+ +Tiller +------ + +Configuration options for bootstrapping with Tiller. + ++-----------------+----------+---------------------------------------------------------------------------------------+ +| keyword | type | action | ++=================+==========+=======================================================================================+ +| storage | string | (optional, not passed by default) The tiller `storage`_ arg to use. ` | ++-----------------+----------+---------------------------------------------------------------------------------------+ +| listen | integer | (optional, default `24134`) The tiller `listen` arg to use. See `Ports`_. | ++-----------------+----------+---------------------------------------------------------------------------------------+ +| probe_listen | integer | (optional, default `24135`) The tiller `probe_listen` arg to use. See `Ports`_. | ++-----------------+----------+---------------------------------------------------------------------------------------+ + +Ports +^^^^^ + +By default, promenade uses tiller ports outside of `net.ipv4.ip_local_port_range` to +avoid conflicts with apiserver connections to etcd, see `example`_. + +The `listen` and `probe_listen` parameters allow setting these back to the +upstream tiller defaults (or any other value) if desired. + Bootstrapping Images -------------------- @@ -100,3 +125,6 @@ Bootstrapping images are specified in the top level key ``images``: controller-manager: etcd: scheduler: + +.. _storage: https://helm.sh/docs/using_helm/#tiller-s-release-information +.. _example: https://helm.sh/docs/developing_charts/#chart-dependencies diff --git a/examples/basic/Genesis.yaml b/examples/basic/Genesis.yaml index 6afbf091..8e8c0f78 100644 --- a/examples/basic/Genesis.yaml +++ b/examples/basic/Genesis.yaml @@ -32,6 +32,8 @@ data: - --v=3 armada: target_manifest: cluster-bootstrap + tiller: + storage: secret etcd: auxiliary_threshold: 3 labels: diff --git a/examples/complete/Genesis.yaml b/examples/complete/Genesis.yaml index 7841d33c..8d22a879 100644 --- a/examples/complete/Genesis.yaml +++ b/examples/complete/Genesis.yaml @@ -13,6 +13,8 @@ data: external_ip: 192.168.77.10 armada: target_manifest: cluster-bootstrap + tiller: + storage: secret etcd: auxiliary_threshold: 3 labels: diff --git a/examples/gate/Genesis.yaml b/examples/gate/Genesis.yaml index c4a9f8eb..1855992b 100644 --- a/examples/gate/Genesis.yaml +++ b/examples/gate/Genesis.yaml @@ -32,6 +32,8 @@ data: - --v=3 armada: target_manifest: cluster-bootstrap + tiller: + storage: secret etcd: auxiliary_threshold: 3 labels: diff --git a/promenade/schemas/Genesis.yaml b/promenade/schemas/Genesis.yaml index d9af9d7e..ea8d7623 100644 --- a/promenade/schemas/Genesis.yaml +++ b/promenade/schemas/Genesis.yaml @@ -114,6 +114,8 @@ data: type: integer probe_listen: type: integer + storage: + type: string additionalProperties: false files: diff --git a/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml b/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml index c22b2594..44783f1c 100644 --- a/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml +++ b/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml @@ -4,6 +4,7 @@ #} {% set tiller_listen = config['Genesis:tiller.listen'] | default(24134) %} {% set tiller_probe_listen = config['Genesis:tiller.probe_listen'] | default(24135) %} +{% set tiller_storage = config.get_path('Genesis:tiller.storage') %} --- apiVersion: v1 kind: Pod @@ -23,6 +24,9 @@ spec: image: {{ config['Genesis:images.helm.tiller'] }} command: - /tiller +{%- if tiller_storage %} + - "--storage={{ tiller_storage }}" +{%- endif %} - -listen - ":{{ tiller_listen }}" - -probe-listen diff --git a/tests/unit/builder_data/simple/Genesis.yaml b/tests/unit/builder_data/simple/Genesis.yaml index 01f8c83e..a1bf0d82 100644 --- a/tests/unit/builder_data/simple/Genesis.yaml +++ b/tests/unit/builder_data/simple/Genesis.yaml @@ -19,6 +19,8 @@ data: - --endpoint-reconciler-type=lease armada: target_manifest: cluster-bootstrap + tiller: + storage: secret labels: dynamic: - calico-etcd=enabled