First attempt including login app in dashboard helmchart

This commit is contained in:
Mart van Santen 2022-03-31 08:18:12 +00:00
parent b16ed99b71
commit bb1aebb706
4 changed files with 21 additions and 13 deletions

View file

@ -17,7 +17,11 @@ data:
HYDRA_AUTHORIZATION_BASE_URL: {{ .Values.backend.oidc.authorizationBaseUrl }} HYDRA_AUTHORIZATION_BASE_URL: {{ .Values.backend.oidc.authorizationBaseUrl }}
TOKEN_URL: {{ .Values.backend.oidc.tokenUrl }} TOKEN_URL: {{ .Values.backend.oidc.tokenUrl }}
HYDRA_URL: {{ .Values.backend.oidc.baseUrl }} HYDRA_URL: {{ .Values.backend.oidc.baseUrl }}
KRATOS_PUBLIC_URL: {{ .Values.backend.kratos.publicUrl }}
KRATOS_ADMIN_URL: {{ .Values.backend.kratos.adminUrl }}
HYDRA_ADMIN_URL: {{ .Values.backend.hydra.adminUrl }}
PUBLIC_URL: {{ .Values.backend.publicUrl }}
DATABASE_URL: {{ .Values.backend.databaseUrl }}
# {{- if .Values.backend.smtp.enabled }} # {{- if .Values.backend.smtp.enabled }}
# DASHBOARD_BACKEND_SMTP_HOST: {{ .Values.backend.smtp.host | quote }} # DASHBOARD_BACKEND_SMTP_HOST: {{ .Values.backend.smtp.host | quote }}
# DASHBOARD_BACKEND_SMTP_PORT: {{ .Values.backend.smtp.port | quote }} # DASHBOARD_BACKEND_SMTP_PORT: {{ .Values.backend.smtp.port | quote }}

View file

@ -57,7 +57,7 @@ spec:
- name: dashboard - name: dashboard
securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 12 }} securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 12 }}
image: {{ template "dashboard.image" . }} image: {{ template "dashboard.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.dashboard.image.pullPolicy | quote }}
{{- if .Values.dashboard.command }} {{- if .Values.dashboard.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 12 }} command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 12 }}
{{- end }} {{- end }}
@ -119,7 +119,7 @@ spec:
- name: backend - name: backend
securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }} securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }}
image: {{ template "backend.image" . }} image: {{ template "backend.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.backend.image.pullPolicy | quote }}
{{- if .Values.backend.command }} {{- if .Values.backend.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }} command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }}
{{- end }} {{- end }}

View file

@ -1,5 +1,6 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }} # apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }}
apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ template "common.names.fullname" . }} name: {{ template "common.names.fullname" . }}
@ -37,27 +38,29 @@ spec:
- host: {{ .Values.ingress.hostname }} - host: {{ .Values.ingress.hostname }}
http: http:
paths: paths:
- path: ({{ .Values.ingress.path }}.*) - path: {{ .Values.ingress.path }}(.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }} {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }} pathType: {{ .Values.ingress.pathType }}
{{- end }} {{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "dashboard.serviceName" .) "servicePort" "dashboard-http" "context" $) | nindent 14 }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "dashboard.serviceName" .) "servicePort" "dashboard-http" "context" $) | nindent 14 }}
# Forward API calls to the back-end container # Forward API calls to the back-end container
- path: ({{ .Values.ingress.path }}api/v1.*) - path: {{ .Values.ingress.path }}(api/v1.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }} {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }} pathType: {{ .Values.ingress.pathType }}
{{- end }} {{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
- path: ({{ .Values.ingress.path }}web.*) - path: {{ .Values.ingress.path }}(web.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }} {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }} pathType: {{ .Values.ingress.pathType }}
{{- end }} {{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
- path: {{ .Values.ingress.path }}kratos/(.*) - path: {{ .Values.ingress.path }}kratos/(.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }} pathType: {{ .Values.ingress.pathType }}
{{- end }} backend:
backend: {{- include "common.ingress.backend" (dict "serviceName" "single-sign-on-kratos-public" "servicePort" "80" "context" $) | nindent 14 }} service:
name: single-sign-on-kratos-public
port:
number: 80
{{- end }} {{- end }}
{{- range .Values.ingress.extraHosts }} {{- range .Values.ingress.extraHosts }}
- host: {{ .name }} - host: {{ .name }}

View file

@ -42,6 +42,7 @@ commonAnnotations: {}
## ##
image: image:
imagePullSecrets: [] imagePullSecrets: []
pullPolicy: Always
## Dashboard configuration parameters ## Dashboard configuration parameters
## ref: https://open.greenhost.net/stackspin/dashboard ## ref: https://open.greenhost.net/stackspin/dashboard
@ -232,12 +233,12 @@ backend:
image: image:
registry: open.greenhost.net:4567 registry: open.greenhost.net:4567
repository: stackspin/dashboard-backend/dashboard-backend repository: stackspin/dashboard-backend/dashboard-backend
tag: 0-1-4 tag: 19-integrate-flask-sso-panel-into-dashboard-flask-backend
## Specify a imagePullPolicy ## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
## ##
pullPolicy: IfNotPresent pullPolicy: Always
## Optionally specify an array of imagePullSecrets. ## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace. ## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
@ -646,7 +647,7 @@ ingress:
path: / path: /
## @param ingress.pathType Ingress path type ## @param ingress.pathType Ingress path type
## ##
pathType: ImplementationSpecific pathType: Prefix
## @param ingress.annotations Ingress annotations done as key:value pairs ## @param ingress.annotations Ingress annotations done as key:value pairs
## For a full list of possible ingress annotations, please see ## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md