Skip to content

Commit

Permalink
Extract common values
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed Apr 21, 2021
1 parent 26e31f6 commit 0ee99fc
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 82 deletions.
16 changes: 10 additions & 6 deletions authgear/templates/authgear-admin-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,24 @@ spec:
mountPath: {{ .Values.authgear.appCustomResources.path | quote }}
{{ end }}
env:
- name: DATABASE_URL
value: {{ .Values.authgear.databaseURL | quote }}
- name: TRUST_PROXY
value: {{ .Values.authgear.mainServer.env.TRUST_PROXY | quote }}
value: {{ .Values.authgear.trustProxy | quote }}
- name: LOG_LEVEL
value: {{ .Values.authgear.mainServer.env.LOG_LEVEL | quote }}
value: {{ .Values.authgear.logLevel | quote }}
- name: SENTRY_DSN
value: {{ .Values.authgear.mainServer.env.SENTRY_DSN | quote }}
- name: ADMIN_API_AUTH
value: {{ .Values.authgear.mainServer.env.ADMIN_API_AUTH | quote }}
value: {{ .Values.authgear.sentryDSN | quote }}
- name: CONFIG_SOURCE_TYPE
value: {{ .Values.authgear.mainServer.env.CONFIG_SOURCE_TYPE | quote }}
value: {{ .Values.authgear.configSourceType | quote }}
- name: CONFIG_SOURCE_KUBE_NAMESPACE
value: {{ .Values.authgear.appNamespace | quote }}
- name: CUSTOM_RESOURCE_DIRECTORY
value: {{ .Values.authgear.appCustomResources.path | quote }}
{{- range $key, $val := .Values.authgear.mainServer.env }}
- name: {{ $key | quote }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: http
containerPort: 3002
Expand Down
16 changes: 10 additions & 6 deletions authgear/templates/authgear-main-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,24 @@ spec:
mountPath: {{ .Values.authgear.appCustomResources.path | quote }}
{{ end }}
env:
- name: DATABASE_URL
value: {{ .Values.authgear.databaseURL | quote }}
- name: TRUST_PROXY
value: {{ .Values.authgear.mainServer.env.TRUST_PROXY | quote }}
value: {{ .Values.authgear.trustProxy | quote }}
- name: LOG_LEVEL
value: {{ .Values.authgear.mainServer.env.LOG_LEVEL | quote }}
value: {{ .Values.authgear.logLevel | quote }}
- name: SENTRY_DSN
value: {{ .Values.authgear.mainServer.env.SENTRY_DSN | quote }}
- name: ADMIN_API_AUTH
value: {{ .Values.authgear.mainServer.env.ADMIN_API_AUTH | quote }}
value: {{ .Values.authgear.sentryDSN | quote }}
- name: CONFIG_SOURCE_TYPE
value: {{ .Values.authgear.mainServer.env.CONFIG_SOURCE_TYPE | quote }}
value: {{ .Values.authgear.configSourceType | quote }}
- name: CONFIG_SOURCE_KUBE_NAMESPACE
value: {{ .Values.authgear.appNamespace | quote }}
- name: CUSTOM_RESOURCE_DIRECTORY
value: {{ .Values.authgear.appCustomResources.path | quote }}
{{- range $key, $val := .Values.authgear.mainServer.env }}
- name: {{ $key | quote }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: http
containerPort: 3000
Expand Down
64 changes: 9 additions & 55 deletions authgear/templates/authgear-portal-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,73 +168,27 @@ spec:
{{ end }}
env:
- name: DATABASE_URL
value: {{ .Values.authgear.portalServer.env.DATABASE_URL | quote }}
value: {{ .Values.authgear.databaseURL | quote }}
- name: TRUST_PROXY
value: {{ .Values.authgear.portalServer.env.TRUST_PROXY | quote }}
value: {{ .Values.authgear.trustProxy | quote }}
- name: LOG_LEVEL
value: {{ .Values.authgear.portalServer.env.LOG_LEVEL | quote }}
value: {{ .Values.authgear.logLevel | quote }}
- name: SENTRY_DSN
value: {{ .Values.authgear.portalServer.env.SENTRY_DSN | quote }}
- name: SMTP_HOST
value: {{ .Values.authgear.portalServer.env.SMTP_HOST | quote }}
- name: SMTP_PORT
value: {{ .Values.authgear.portalServer.env.SMTP_PORT | quote }}
- name: SMTP_MODE
value: {{ .Values.authgear.portalServer.env.SMTP_MODE | quote }}
- name: SMTP_USERNAME
value: {{ .Values.authgear.portalServer.env.SMTP_USERNAME | quote }}
- name: SMTP_PASSWORD
value: {{ .Values.authgear.portalServer.env.SMTP_PASSWORD | quote }}
- name: MAIL_SENDER
value: {{ .Values.authgear.portalServer.env.MAIL_SENDER | quote }}
- name: MAIL_REPLY_TO
value: {{ .Values.authgear.portalServer.env.MAIL_REPLY_TO | quote }}
value: {{ .Values.authgear.sentryDSN | quote }}
- name: CONFIG_SOURCE_TYPE
value: {{ .Values.authgear.portalServer.env.CONFIG_SOURCE_TYPE | quote }}
value: {{ .Values.authgear.configSourceType | quote }}
- name: CONFIG_SOURCE_KUBE_NAMESPACE
value: {{ .Values.authgear.appNamespace | quote }}
- name: AUTHGEAR_APP_ID
value: {{ .Values.authgear.portalServer.env.AUTHGEAR_APP_ID | quote }}
- name: AUTHGEAR_CLIENT_ID
value: {{ .Values.authgear.portalServer.env.AUTHGEAR_CLIENT_ID | quote }}
- name: AUTHGEAR_ENDPOINT
value: {{ .Values.authgear.portalServer.env.AUTHGEAR_ENDPOINT | quote }}
- name: ADMIN_API_TYPE
value: {{ .Values.authgear.portalServer.env.ADMIN_API_TYPE | quote }}
- name: ADMIN_API_AUTH
value: {{ .Values.authgear.portalServer.env.ADMIN_API_AUTH | quote }}
- name: ADMIN_API_ENDPOINT
value: {{ .Values.authgear.portalServer.env.ADMIN_API_ENDPOINT | quote }}
- name: ADMIN_API_HOST_TEMPLATE
value: {{ .Values.authgear.portalServer.env.ADMIN_API_HOST_TEMPLATE | quote }}
- name: APP_HOST_SUFFIX
value: {{ .Values.authgear.portalServer.env.APP_HOST_SUFFIX | quote }}
- name: APP_CUSTOM_RESOURCE_DIRECTORY
value: {{ .Values.authgear.appCustomResources.path | quote }}
- name: PORTAL_CUSTOM_RESOURCE_DIRECTORY
value: {{ .Values.authgear.portalCustomResources.path | quote }}
- name: APP_KUBERNETES_INGRESS_TEMPLATE_FILE
value: /app/configmap/ingress-template/ingress.tpl.yaml
- name: APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_TYPE
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_TYPE | quote }}
- name: APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_SECRET_NAME
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_SECRET_NAME | quote }}
- name: APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_ISSUER_KIND
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_ISSUER_KIND | quote }}
- name: APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_ISSUER_NAME
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_DEFAULT_DOMAIN_TLS_CERT_ISSUER_NAME | quote }}
- name: APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_TYPE
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_TYPE | quote }}
- name: APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_SECRET_NAME
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_SECRET_NAME | quote }}
- name: APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_ISSUER_KIND
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_ISSUER_KIND | quote }}
- name: APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_ISSUER_NAME
value: {{ .Values.authgear.portalServer.env.APP_KUBERNETES_CUSTOM_DOMAIN_TLS_CERT_ISSUER_NAME | quote }}
- name: APP_MAX_OWNED_APPS
value: {{ .Values.authgear.portalServer.env.APP_MAX_OWNED_APPS | quote }}
- name: APP_SECRET_KEY_ALLOWLIST
value: {{ .Values.authgear.portalServer.env.APP_SECRET_KEY_ALLOWLIST | quote }}
{{- range $key, $val := .Values.authgear.portalServer.env }}
- name: {{ $key | quote }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: portal
containerPort: 3003
Expand Down
16 changes: 10 additions & 6 deletions authgear/templates/authgear-resolver-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,24 @@ spec:
mountPath: {{ .Values.authgear.appCustomResources.path | quote }}
{{ end }}
env:
- name: DATABASE_URL
value: {{ .Values.authgear.databaseURL | quote }}
- name: TRUST_PROXY
value: {{ .Values.authgear.mainServer.env.TRUST_PROXY | quote }}
value: {{ .Values.authgear.trustProxy | quote }}
- name: LOG_LEVEL
value: {{ .Values.authgear.mainServer.env.LOG_LEVEL | quote }}
value: {{ .Values.authgear.logLevel | quote }}
- name: SENTRY_DSN
value: {{ .Values.authgear.mainServer.env.SENTRY_DSN | quote }}
- name: ADMIN_API_AUTH
value: {{ .Values.authgear.mainServer.env.ADMIN_API_AUTH | quote }}
value: {{ .Values.authgear.sentryDSN | quote }}
- name: CONFIG_SOURCE_TYPE
value: {{ .Values.authgear.mainServer.env.CONFIG_SOURCE_TYPE | quote }}
value: {{ .Values.authgear.configSourceType | quote }}
- name: CONFIG_SOURCE_KUBE_NAMESPACE
value: {{ .Values.authgear.appNamespace | quote }}
- name: CUSTOM_RESOURCE_DIRECTORY
value: {{ .Values.authgear.appCustomResources.path | quote }}
{{- range $key, $val := .Values.authgear.mainServer.env }}
- name: {{ $key | quote }}
value: {{ $val | quote }}
{{- end }}
ports:
- name: http
containerPort: 3001
Expand Down
15 changes: 6 additions & 9 deletions authgear/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ subcharts:
authgear:
appNamespace: "authgear-apps"

databaseURL: postgres://localhost
configSourceType: "kubernetes"
trustProxy: "true"
logLevel: "info"
sentryDSN: ""

mainServer:
image: __replace_me__

env:
TRUST_PROXY: "true"
LOG_LEVEL: "info"
SENTRY_DSN: ""
ADMIN_API_AUTH: "jwt"
CONFIG_SOURCE_TYPE: "kubernetes"

resources:
requests:
Expand Down Expand Up @@ -60,18 +62,13 @@ authgear:
name: __replace_me__

env:
DATABASE_URL: postgres://localhost
TRUST_PROXY: "true"
LOG_LEVEL: "info"
SENTRY_DSN: ""
SMTP_HOST: __replace_me__
SMTP_PORT: 587
SMTP_MODE: normal
SMTP_USERNAME: __replace_me__
SMTP_PASSWORD: __replace_me__
MAIL_SENDER: __replace_me__
MAIL_REPLY_TO: __replace_me__
CONFIG_SOURCE_TYPE: "kubernetes"
AUTHGEAR_APP_ID: __replace_me__
AUTHGEAR_CLIENT_ID: __replace_me__
AUTHGEAR_ENDPOINT: https://__replace_me__.example.com
Expand Down

0 comments on commit 0ee99fc

Please sign in to comment.