From fa060b0f516dcd8714f36f1e82e3b0c51cf3b565 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Tue, 28 Nov 2023 14:50:17 -0600 Subject: [PATCH] feat: Update domain for production MOLLI frontend --- chart/.gitignore | 1 + chart/Chart.lock | 6 ++++++ chart/Chart.yaml | 4 ++++ chart/templates/extra-list.yaml | 5 +++++ chart/templates/ingress.yaml | 15 +++++++++++++++ chart/values.local.yaml | 1 + chart/values.prod.yaml | 23 ++++++++++++++++++----- chart/values.yaml | 1 + 8 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 chart/.gitignore create mode 100644 chart/Chart.lock create mode 100644 chart/templates/extra-list.yaml diff --git a/chart/.gitignore b/chart/.gitignore new file mode 100644 index 0000000..ee3892e --- /dev/null +++ b/chart/.gitignore @@ -0,0 +1 @@ +charts/ diff --git a/chart/Chart.lock b/chart/Chart.lock new file mode 100644 index 0000000..7969ed1 --- /dev/null +++ b/chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://charts.bitnami.com/bitnami + version: 2.2.5 +digest: sha256:8f229670218d567d03eb34c14c3a1ea3612bd2339058ce67348c5bcc0dd556b5 +generated: "2023-11-28T14:43:23.286768-06:00" diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 0077486..0e3ba15 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,3 +2,7 @@ apiVersion: v2 description: "MOLLI Frontend" name: molli-frontend version: 1.0.0 +dependencies: +- name: common + version: ~2.2.0 + repository: "https://charts.bitnami.com/bitnami" diff --git a/chart/templates/extra-list.yaml b/chart/templates/extra-list.yaml new file mode 100644 index 0000000..9c3ee4b --- /dev/null +++ b/chart/templates/extra-list.yaml @@ -0,0 +1,5 @@ +{{- range .Values.extraDeploy }} +--- +{{ include "common.tplvalues.render" (dict "value" . "context" $) }} +{{- end }} + diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml index 9064fcb..4ce841b 100644 --- a/chart/templates/ingress.yaml +++ b/chart/templates/ingress.yaml @@ -12,6 +12,9 @@ spec: tls: - hosts: - {{ .Values.ingress.hostname }} +{{- range $key, $value := .Values.ingress.extraHosts }} + - {{ . }} +{{- end }} secretName: {{ .Values.ingress.hostname }}-tls {{- end }} {{- if .Values.ingress.ingressClassName }} @@ -28,3 +31,15 @@ spec: number: 80 path: / pathType: ImplementationSpecific +{{- range $key, $value := .Values.ingress.extraHosts }} + - host: {{ . }} + http: + paths: + - backend: + service: + name: {{ $.Release.Name }} + port: + number: 80 + path: / + pathType: ImplementationSpecific +{{- end }} diff --git a/chart/values.local.yaml b/chart/values.local.yaml index 1121ef2..baebdff 100644 --- a/chart/values.local.yaml +++ b/chart/values.local.yaml @@ -1,5 +1,6 @@ ingress: ingressClassName: nginx + #ingressClassName: traefik hostname: molli.proxy.localhost tls: true diff --git a/chart/values.prod.yaml b/chart/values.prod.yaml index 2b805a4..6b9ec76 100644 --- a/chart/values.prod.yaml +++ b/chart/values.prod.yaml @@ -1,16 +1,29 @@ ingress: - hostname: molli.frontend.mmli1.ncsa.illinois.edu + hostname: molli.platform.moleculemaker.org + extraHosts: + - molli.frontend.mmli1.ncsa.illinois.edu tls: true annotations: cert-manager.io/cluster-issuer: letsencrypt-production kubernetes.io/tls-acme: "true" traefik.ingress.kubernetes.io/router.tls: "true" + traefik.ingress.kubernetes.io/router.middlewares: "alphasynthesis-molli-prod-domain-redirect@kubernetescrd" config: hostname: "https://jobmgr.mmli1.ncsa.illinois.edu" basePath: "api/v1" - signInUrl: "https://mmli1.ncsa.illinois.edu/oauth2/start?rd=https%3A%2F%2Fmolli.frontend.mmli1.ncsa.illinois.edu%2Fconfiguration" - signOutUrl: "https://mmli1.ncsa.illinois.edu/oauth2/sign_out?rd=https%3A%2F%2Fmolli.frontend.mmli1.ncsa.illinois.edu%2Fconfiguration" - userInfoUrl: "https://mmli1.ncsa.illinois.edu/oauth2/userinfo" - + signInUrl: "https://auth.platform.moleculemaker.org/oauth2/start?rd=https%3A%2F%2Fmolli.platform.moleculemaker.org%2Fconfiguration" + signOutUrl: "https://auth.platform.moleculemaker.org/oauth2/sign_out?rd=https%3A%2F%2Fmolli.platform.moleculemaker.org%2Fconfiguration" + userInfoUrl: "https://auth.platform.moleculemaker.org/oauth2/userinfo" +extraDeploy: +- apiVersion: traefik.containo.us/v1alpha1 + kind: Middleware + metadata: + name: molli-prod-domain-redirect + namespace: alphasynthesis + spec: + redirectRegex: + regex: "^https://molli.frontend.mmli1.ncsa.illinois.edu/(.*)" + replacement: "https://molli.platform.moleculemaker.org/${1}" + permanent: true diff --git a/chart/values.yaml b/chart/values.yaml index 63a60d2..a5cab8a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -13,3 +13,4 @@ config: controller: image: moleculemaker/molli-frontend +extraDeploy: []