Skip to content

Commit

Permalink
prep config for stage deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Sep 20, 2023
1 parent 8dda251 commit 926744e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 117 deletions.
74 changes: 0 additions & 74 deletions .gitlab-ci.yml

This file was deleted.

7 changes: 3 additions & 4 deletions deploy/chart/templates/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ metadata:
labels:
{{- include "thesis-platform.labels" . | nindent 4 }}
data:
AUTH0_CLIENT_ID: {{ .Values.auth0.clientId | quote }}
AUTH0_ISSUER: {{ .Values.auth0.issuer | quote }}
AZURE_AD_CLIENT_ID: {{ .Values.azureAd.clientId | quote }}
AZURE_AD_TENANT_ID: {{ .Values.azureAd.tenantId | quote }}
EMAIL_SERVER_USER: {{ .Values.email.user | quote }}
EMAIL_SERVER_HOST: {{ .Values.email.host | quote }}
EMAIL_SERVER_PORT: {{ .Values.email.port | quote }}
EMAIL_FROM: {{ .Values.email.from | quote }}
NEXTAUTH_URL: {{ .Values.appUrl | quote }}
NODE_ENV: {{ .Values.env | quote }}
4 changes: 0 additions & 4 deletions deploy/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ spec:
labels:
{{- include "thesis-platform.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
7 changes: 0 additions & 7 deletions deploy/chart/templates/registry-secret.yml

This file was deleted.

5 changes: 3 additions & 2 deletions deploy/chart/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ metadata:
{{- include "thesis-platform.labels" . | nindent 4 }}
type: Opaque
stringData:
NEXTAUTH_SECRET: {{ .Values.appSecret | quote }}
AUTH0_CLIENT_SECRET: {{ .Values.auth0.clientSecret | quote }}
AZURE_AD_CLIENT_SECRET: {{ .Values.azureAd.clientSecret | quote }}
EMAIL_SERVER_PASSWORD: {{ .Values.email.password | quote }}
AZURE_STORAGE_ACCOUNT_ACCESS_KEY: {{ .Values.azureBlob.accessKey | quote }}
DATABASE_URL: {{ .Values.database.url | quote }}
NEXTAUTH_SECRET: {{ .Values.appSecret | quote }}
26 changes: 11 additions & 15 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
env: ""

azureAd:
clientId: ""
clientSecret: ""
tenantId: ""

email:
user: ""
password: ""
host: ""
port: ""
from: ""
auth0:
clientId: ""
clientSecret: ""
issuer: ""

azureBlob:
accessKey: ""

database:
url: ""

appSecret: ""

imageCredentials:
registry: cr.gitlab.uzh.ch
username: gitlab+deploy-token

imagePullSecrets:
- name: gitlab-uzh-thesis-platform-registry

replicaCount: 1

image:
repository: cr.gitlab.uzh.ch/uzh-bf/thesis-platform
tag: latest
repository: ghcr.io/uzh-bf/thesis-platform
tag: main
pullPolicy: Always

service:
Expand Down
31 changes: 20 additions & 11 deletions deploy/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
releases:
- name: thesis-platform
namespace: thesis-platform
namespace: '{{ env "NAMESPACE" | default "thesis-platform-stage" }}'
createNamespace: true
chart: ./chart
version: '{{ env "CHART_VERSION" | default "0.1.0" }}'
installed: true
kubeContext: bf-k8s463ba113
values:
- imageCredentials:
password: '{{ env "REGISTRY_PASSWORD" }}'
- appSecret: '{{ env "NEXTAUTH_SECRET" }}'
appUrl: '{{ env "NEXT_PUBLIC_APP_URL" }}'
env: '{{ env "NODE_ENV" }}'

azureAd:
clientId: '{{ env "AZURE_AD_CLIENT_ID" }}'
clientSecret: '{{ env "AZURE_AD_CLIENT_SECRET" }}'
tenantId: '{{ env "AZURE_AD_TENANT_ID" }}'

email:
host: '{{ env "EMAIL_SERVER_HOST" }}'
password: '{{ env "EMAIL_SERVER_PASSWORD" }}'
user: '{{ env "EMAIL_SERVER_USER" }}'
port: '{{ env "EMAIL_SERVER_PORT" }}'
from: '{{ env "EMAIL_FROM" }}'
auth0:
clientId: '{{ env "AUTH0_CLIENT_ID" }}'
clientSecret: '{{ env "AUTH0_CLIENT_SECRET" }}'
issuer: '{{ env "AUTH0_ISSUER" }}'

azureBlob:
accessKey: '{{ env "AZURE_STORAGE_ACCOUNT_ACCESS_KEY" }}'

database:
url: '{{ env "DATABASE_URL" }}'

appSecret: '{{ env "NEXTAUTH_SECRET" }}'
appUrl: '{{ env "NEXT_PUBLIC_APP_URL" }}'
ingress:
hosts:
- host: '{{ env "APP_DOMAIN" }}'
paths:
- /
tls:
- secretName: thesis-platform-tls
hosts:
- '{{ env "APP_DOMAIN" }}'

0 comments on commit 926744e

Please sign in to comment.