Skip to content

Commit

Permalink
Merge pull request syseleven#89 from syseleven/application-credentials
Browse files Browse the repository at this point in the history
Support application credentials in Helm chart
  • Loading branch information
ovstuckrad authored Oct 20, 2022
2 parents 46bbe23 + 1bb304f commit ee97bc1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/designate-certmanager-webhook/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
15 changes: 13 additions & 2 deletions helm/designate-certmanager-webhook/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
Expand All @@ -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 }}
2 changes: 2 additions & 0 deletions helm/designate-certmanager-webhook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down

0 comments on commit ee97bc1

Please sign in to comment.