diff --git a/helm/designate-certmanager-webhook/Chart.yaml b/helm/designate-certmanager-webhook/Chart.yaml index 7e56aa6d..ca9cf5b3 100644 --- a/helm/designate-certmanager-webhook/Chart.yaml +++ b/helm/designate-certmanager-webhook/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "0.2.18" description: ACME webhook Implementation for OpenStack Designate name: designate-certmanager-webhook -version: "0.4.0" +version: "0.5.0" diff --git a/helm/designate-certmanager-webhook/templates/secret.yaml b/helm/designate-certmanager-webhook/templates/secret.yaml index 5cb7636f..d22d2e59 100644 --- a/helm/designate-certmanager-webhook/templates/secret.yaml +++ b/helm/designate-certmanager-webhook/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.openstack.username .Values.openstack.password }} +{{- if or (and .Values.openstack.username .Values.openstack.password) (and .Values.openstack.application_credential_id .Values.openstack.application_credential_secret) }} apiVersion: v1 kind: Secret metadata: @@ -16,12 +16,20 @@ data: {{- if .Values.openstack.password }} OS_PASSWORD: {{ .Values.openstack.password | b64enc | quote }} {{- end }} + {{- if .Values.openstack.application_credential_id }} + OS_APPLICATION_CREDENTIAL_ID: {{ .Values.openstack.application_credential_id | b64enc | quote }} + {{- end }} + {{- if .Values.openstack.application_credential_secret }} + OS_APPLICATION_CREDENTIAL_SECRET: {{ .Values.openstack.application_credential_secret | b64enc | quote }} + {{- end }} {{- if .Values.openstack.project_id }} OS_PROJECT_ID: {{ .Values.openstack.project_id | b64enc | quote }} {{- else if .Values.openstack.project_name }} OS_PROJECT_NAME: {{ .Values.openstack.project_name | b64enc | quote }} {{- else }} - {{- fail "project_id or project_name is needed!" }} + {{- if ne .Values.openstack.auth_type "v3applicationcredential" }} + {{- fail "project_id or project_name is needed!" }} + {{- end }} {{- end }} {{- if .Values.openstack.region_name }} OS_REGION_NAME: {{ .Values.openstack.region_name | b64enc | quote }} @@ -32,4 +40,7 @@ data: {{- if .Values.openstack.domain_name }} OS_DOMAIN_NAME: {{ .Values.openstack.domain_name | b64enc | quote }} {{- end }} + {{- if .Values.openstack.auth_type }} + OS_AUTH_TYPE: {{ .Values.openstack.auth_type | b64enc | quote }} + {{- end }} {{- end }} diff --git a/helm/designate-certmanager-webhook/values.yaml b/helm/designate-certmanager-webhook/values.yaml index ab2132aa..539cecb9 100644 --- a/helm/designate-certmanager-webhook/values.yaml +++ b/helm/designate-certmanager-webhook/values.yaml @@ -30,6 +30,8 @@ credentialsSecret: cloud-credentials openstack: username: "" password: "" + application_credential_id: "" + application_credential_secret: "" project_id: "" project_name: "" # Use project_id OR project_name region_name: ""