From 26fd6bc04cfec0f68bc8eb8b11578d8d414fceed Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Thu, 13 Sep 2018 06:56:28 -0500 Subject: [PATCH] Helm-Toolkit: Add doc comments for keystone env snippets This PS adds doc comments for the keystone env snippets Change-Id: Ia18b3101e639a713b7cc1c88146a2f91bbcb3984 Signed-off-by: Pete Birley --- .../snippets/_keystone_openrc_env_vars.tpl | 55 +++++++++++++++++++ .../_keystone_user_create_env_vars.tpl | 43 +++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl b/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl index 899e8418a..1d4f483a7 100644 --- a/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl +++ b/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl @@ -14,6 +14,61 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{/* +abstract: | + Returns a set of container enviorment variables, equivlant to an openrc for + use with keystone based command line clients. +values: | + secrets: + identity: + admin: example-keystone-admin +usage: | + {{ include "helm-toolkit.snippets.keystone_openrc_env_vars" ( dict "ksUserSecret" .Values.secrets.identity.admin ) }} +return: | + - name: OS_IDENTITY_API_VERSION + value: "3" + - name: OS_AUTH_URL + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_AUTH_URL + - name: OS_REGION_NAME + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_REGION_NAME + - name: OS_INTERFACE + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_INTERFACE + - name: OS_PROJECT_DOMAIN_NAME + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_PROJECT_DOMAIN_NAME + - name: OS_PROJECT_NAME + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_PROJECT_NAME + - name: OS_USER_DOMAIN_NAME + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_USER_DOMAIN_NAME + - name: OS_USERNAME + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_USERNAME + - name: OS_PASSWORD + valueFrom: + secretKeyRef: + name: example-keystone-admin + key: OS_PASSWORD +*/}} + {{- define "helm-toolkit.snippets.keystone_openrc_env_vars" }} {{- $ksUserSecret := .ksUserSecret }} - name: OS_IDENTITY_API_VERSION diff --git a/helm-toolkit/templates/snippets/_keystone_user_create_env_vars.tpl b/helm-toolkit/templates/snippets/_keystone_user_create_env_vars.tpl index dd16e68c3..622757bc6 100644 --- a/helm-toolkit/templates/snippets/_keystone_user_create_env_vars.tpl +++ b/helm-toolkit/templates/snippets/_keystone_user_create_env_vars.tpl @@ -14,6 +14,49 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{/* +abstract: | + Returns a set of container enviorment variables, for use with the keystone + user management jobs. +values: | + secrets: + identity: + service_user: example-keystone-user +usage: | + {{ include "helm-toolkit.snippets.keystone_user_create_env_vars" ( dict "ksUserSecret" .Values.secrets.identity.service_user ) }} +return: | + - name: SERVICE_OS_REGION_NAME + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_REGION_NAME + - name: SERVICE_OS_PROJECT_DOMAIN_NAME + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_PROJECT_DOMAIN_NAME + - name: SERVICE_OS_PROJECT_NAME + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_PROJECT_NAME + - name: SERVICE_OS_USER_DOMAIN_NAME + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_USER_DOMAIN_NAME + - name: SERVICE_OS_USERNAME + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_USERNAME + - name: SERVICE_OS_PASSWORD + valueFrom: + secretKeyRef: + name: example-keystone-user + key: OS_PASSWORD +*/}} + {{- define "helm-toolkit.snippets.keystone_user_create_env_vars" }} {{- $ksUserSecret := .ksUserSecret }} - name: SERVICE_OS_REGION_NAME