Added additional OAuth variable + refactored so that OAuth variables are now in template function
All checks were successful
Deploy the Helm Chart / build (push) Successful in 16s
All checks were successful
Deploy the Helm Chart / build (push) Successful in 16s
This commit is contained in:
parent
c181d7c4ea
commit
21cfbf79dc
4 changed files with 38 additions and 26 deletions
33
templates/_oauth.tpl
Normal file
33
templates/_oauth.tpl
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{{- define "oauth.envVars" -}}
|
||||||
|
# OAuth Implementation Stuff
|
||||||
|
- name: BASE_APP_URL
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: base-app-url
|
||||||
|
- name: APP_ABBRV
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: app-abbreviation
|
||||||
|
- name: APP_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: app-name
|
||||||
|
- name: SERVICE_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: service-name
|
||||||
|
- name: DEV_PORT
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: dev-port
|
||||||
|
- name: APP_REG_CONTACT_EMAIL
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ .Release.Name }}-oauth-credentials
|
||||||
|
key: app-reg-contact-email
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -31,32 +31,9 @@ spec:
|
||||||
value: "9010"
|
value: "9010"
|
||||||
- name: ACCOUNTS_SUBDOMAIN_PREFIX
|
- name: ACCOUNTS_SUBDOMAIN_PREFIX
|
||||||
value: "account"
|
value: "account"
|
||||||
# OAuth Implementation Stuff
|
{{- /* This injects the YAML defined in the `_oauth.tpl` file */ -}}
|
||||||
- name: BASE_APP_URL
|
{{- include "oauth.envVars" . | nindent 8 }}
|
||||||
valueFrom:
|
{{- /* This injects the YAML defined from the `db_deploy`, `cache_deploy` and `nosql_deploy` subcharts */ -}}
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ .Release.Name }}-oauth-credentials
|
|
||||||
key: base-app-url
|
|
||||||
- name: APP_ABBRV
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ .Release.Name }}-oauth-credentials
|
|
||||||
key: app-abbreviation
|
|
||||||
- name: APP_NAME
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ .Release.Name }}-oauth-credentials
|
|
||||||
key: app-name
|
|
||||||
- name: SERVICE_NAME
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ .Release.Name }}-oauth-credentials
|
|
||||||
key: service-name
|
|
||||||
- name: DEV_PORT
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ .Release.Name }}-oauth-credentials
|
|
||||||
key: dev-port
|
|
||||||
{{- include "db.envVars" . | nindent 8 }}
|
{{- include "db.envVars" . | nindent 8 }}
|
||||||
{{- include "cache.envVars" . | nindent 8 }}
|
{{- include "cache.envVars" . | nindent 8 }}
|
||||||
{{- include "nosql.envVars" . | nindent 8 }}
|
{{- include "nosql.envVars" . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,4 @@ data:
|
||||||
app-name: {{ .Values.oauth.appName }}
|
app-name: {{ .Values.oauth.appName }}
|
||||||
service-name: {{ .Values.oauth.serviceName }}
|
service-name: {{ .Values.oauth.serviceName }}
|
||||||
dev-port: {{ .Values.oauth.devPort | quote }}
|
dev-port: {{ .Values.oauth.devPort | quote }}
|
||||||
|
app-reg-contact-email: {{ .Values.oauth.appRegContactEmail | quote }}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ oauth:
|
||||||
appName: "<App Name>"
|
appName: "<App Name>"
|
||||||
serviceName: "<Service Name>"
|
serviceName: "<Service Name>"
|
||||||
devPort: "<Dev Port>"
|
devPort: "<Dev Port>"
|
||||||
|
appRegContactEmail: "<App Registration Contact Email>"
|
||||||
|
|
||||||
# Configuration for the relational database
|
# Configuration for the relational database
|
||||||
# See the [Database Deployment Helm Chart](https://git.bridgemanaccessible.ca/Bridgeman-Accessible/db-deploy-helm) for more information
|
# See the [Database Deployment Helm Chart](https://git.bridgemanaccessible.ca/Bridgeman-Accessible/db-deploy-helm) for more information
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue