diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.yaml b/helm-toolkit/templates/manifests/_job-bootstrap.yaml index cddc3facf..f9b6453d5 100644 --- a/helm-toolkit/templates/manifests/_job-bootstrap.yaml +++ b/helm-toolkit/templates/manifests/_job-bootstrap.yaml @@ -59,8 +59,6 @@ spec: {{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{- if eq $openrc "true" }} env: - - name: OS_INTERFACE - value: "internal" {{- with $env := dict "ksUserSecret" ( index $envAll.Values.secrets.identity $keystoneUser ) }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} diff --git a/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl b/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl index dfded6433..899e8418a 100644 --- a/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl +++ b/helm-toolkit/templates/snippets/_keystone_openrc_env_vars.tpl @@ -28,6 +28,11 @@ limitations under the License. secretKeyRef: name: {{ $ksUserSecret }} key: OS_REGION_NAME +- name: OS_INTERFACE + valueFrom: + secretKeyRef: + name: {{ $ksUserSecret }} + key: OS_INTERFACE - name: OS_PROJECT_DOMAIN_NAME valueFrom: secretKeyRef: diff --git a/helm-toolkit/templates/snippets/_keystone_secret_openrc.tpl b/helm-toolkit/templates/snippets/_keystone_secret_openrc.tpl index 66568f213..45054ff5d 100644 --- a/helm-toolkit/templates/snippets/_keystone_secret_openrc.tpl +++ b/helm-toolkit/templates/snippets/_keystone_secret_openrc.tpl @@ -20,10 +20,11 @@ limitations under the License. {{- $context := index . 2 -}} {{- $userContext := index $context.Values.endpoints.identity.auth $userClass }} OS_AUTH_URL: {{ tuple "identity" $identityEndpoint "api" $context | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | b64enc }} -OS_REGION_NAME: {{ $userContext.region_name | b64enc }} -OS_PROJECT_DOMAIN_NAME: {{ $userContext.project_domain_name | b64enc }} -OS_PROJECT_NAME: {{ $userContext.project_name | b64enc }} -OS_USER_DOMAIN_NAME: {{ $userContext.user_domain_name | b64enc }} -OS_USERNAME: {{ $userContext.username | b64enc }} -OS_PASSWORD: {{ $userContext.password | b64enc }} +OS_REGION_NAME: {{ $userContext.region_name | b64enc }} +OS_INTERFACE: {{ $userContext.interface | default "internal" | b64enc }} +OS_PROJECT_DOMAIN_NAME: {{ $userContext.project_domain_name | b64enc }} +OS_PROJECT_NAME: {{ $userContext.project_name | b64enc }} +OS_USER_DOMAIN_NAME: {{ $userContext.user_domain_name | b64enc }} +OS_USERNAME: {{ $userContext.username | b64enc }} +OS_PASSWORD: {{ $userContext.password | b64enc }} {{- end }}