From 91f7cf841021649653b92c5838a6fa7d3eb653a6 Mon Sep 17 00:00:00 2001 From: Fabian Fischer Date: Wed, 16 Mar 2022 15:13:59 +0100 Subject: [PATCH 1/2] Add option to configure auth path when connecting to external an vault --- class/defaults.yml | 3 ++- component/operator.jsonnet | 4 ++++ docs/modules/ROOT/pages/references/parameters.adoc | 7 +++++++ .../lieutenant/lieutenant/00_crds/syn.tools_tenants.yaml | 4 ++-- .../lieutenant/00_crds/syn.tools_tenanttemplates.yaml | 4 ++-- .../lieutenant/lieutenant/10_operator/deployment.yaml | 2 +- tests/unit/defaults_test.go | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/class/defaults.yml b/class/defaults.yml index d9c2838..b0064ca 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -5,7 +5,7 @@ parameters: operator: registry: quay.io repository: projectsyn/lieutenant-operator - version: '1.1.2' + version: '1.3.0' api: registry: docker.io repository: projectsyn/lieutenant-api @@ -26,6 +26,7 @@ parameters: vault: enabled: true addr: vault.todo + auth_path: 'kubernetes' path: kv api: lieutenant_instance: ${lieutenant:namespace} diff --git a/component/operator.jsonnet b/component/operator.jsonnet index 2115d14..8102cfe 100644 --- a/component/operator.jsonnet +++ b/component/operator.jsonnet @@ -72,6 +72,10 @@ local objects = [ name: 'VAULT_ADDR', value: params.operator.vault.addr, }, + { + name: 'VAULT_AUTH_PATH', + value: params.operator.vault.auth_path, + } { name: 'VAULT_SECRET_ENGINE_PATH', value: params.operator.vault.path, diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index b592ffb..50f32f5 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -78,6 +78,13 @@ default:: `vault.todo` Address to the Vault instance. +== `operator.vault.auth_path` + +[horizontal] +type:: string +default:: `kubernetes` + +The mount path of the authenitcation method to use. == `operator.vault.path` diff --git a/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenants.yaml b/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenants.yaml index 3f6ec0e..2b6e887 100644 --- a/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenants.yaml +++ b/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenants.yaml @@ -45,8 +45,8 @@ spec: properties: clusterTemplate: description: ClusterTemplate defines a template which will be used - to set defaults for the clusters of this tenant. The fields whitin - this can use Go templating. See [the docs](https://syn.tools/lieutenant-operator/explanation/templating.html) + to set defaults for the clusters of this tenant. The fields within + this can use Go templating. See https://syn.tools/lieutenant-operator/explanations/templating.html for details. properties: deletionPolicy: diff --git a/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenanttemplates.yaml b/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenanttemplates.yaml index 5d4ecc4..1d82a72 100644 --- a/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenanttemplates.yaml +++ b/tests/golden/defaults/lieutenant/lieutenant/00_crds/syn.tools_tenanttemplates.yaml @@ -45,8 +45,8 @@ spec: properties: clusterTemplate: description: ClusterTemplate defines a template which will be used - to set defaults for the clusters of this tenant. The fields whitin - this can use Go templating. See [the docs](https://syn.tools/lieutenant-operator/explanation/templating.html) + to set defaults for the clusters of this tenant. The fields within + this can use Go templating. See https://syn.tools/lieutenant-operator/explanations/templating.html for details. properties: deletionPolicy: diff --git a/tests/golden/defaults/lieutenant/lieutenant/10_operator/deployment.yaml b/tests/golden/defaults/lieutenant/lieutenant/10_operator/deployment.yaml index 9e8f740..f6c9984 100644 --- a/tests/golden/defaults/lieutenant/lieutenant/10_operator/deployment.yaml +++ b/tests/golden/defaults/lieutenant/lieutenant/10_operator/deployment.yaml @@ -41,7 +41,7 @@ spec: value: 'false' - name: SKIP_VAULT_SETUP value: 'true' - image: quay.io/projectsyn/lieutenant-operator:1.1.2 + image: quay.io/projectsyn/lieutenant-operator:1.3.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/unit/defaults_test.go b/tests/unit/defaults_test.go index 9043c45..9770a26 100644 --- a/tests/unit/defaults_test.go +++ b/tests/unit/defaults_test.go @@ -19,7 +19,7 @@ var ( namespace = "lieutenant" operator = "lieutenant-operator-controller-manager" - operatorImage = "quay.io/projectsyn/lieutenant-operator:1.1.2" + operatorImage = "quay.io/projectsyn/lieutenant-operator:1.3.0" api = "lieutenant-api" apiImage = "docker.io/projectsyn/lieutenant-api:v0.8.0" From d9bcd5fc98c3921762f07b5b5939d1ab9f36f42b Mon Sep 17 00:00:00 2001 From: Fabian Fischer <10788152+glrf@users.noreply.github.com> Date: Wed, 16 Mar 2022 15:23:09 +0100 Subject: [PATCH 2/2] Improve wording in reference Co-authored-by: Simon Gerber --- docs/modules/ROOT/pages/references/parameters.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 50f32f5..fdce658 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -84,7 +84,7 @@ Address to the Vault instance. type:: string default:: `kubernetes` -The mount path of the authenitcation method to use. +The mount path of the Vault authentication method to use. == `operator.vault.path`