From fdde6c9cc5ca8af7ddd944d08eb6f77fa81ed4ba Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Wed, 28 Feb 2024 20:41:00 -0500 Subject: [PATCH] cleaned up manifests and charts --- charts/core-api/templates/deployment.yaml | 26 +++++++++++++------ charts/core-api/values.yaml | 27 ++++++++++++++++---- charts/ui/templates/deployment.yaml | 8 +++++- charts/ui/values.yaml | 5 +++- dev/.config/config.json | 31 ++++++++++------------- dev/apps/core-api.yaml | 29 +++++++++++++++++---- dev/apps/ui.yaml | 16 ++++++++---- 7 files changed, 99 insertions(+), 43 deletions(-) diff --git a/charts/core-api/templates/deployment.yaml b/charts/core-api/templates/deployment.yaml index a76a419..db1cd7e 100644 --- a/charts/core-api/templates/deployment.yaml +++ b/charts/core-api/templates/deployment.yaml @@ -37,22 +37,32 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + - name: UI__BaseUrl + value: {{.Values.auth.baseUrl}} + - name: Auth0__Audience + value: {{ .Values.auth.audience}} + - name: Auth0__Domain + value: {{ .Values.auth.issuerBaseUrl }} - name: Auth0__ClientId - value: 19GWUL7fWFQWEpdFFtlgv2x3kqfSa0ES + value: {{ .Values.auth.clientId }} - name: Auth0__ClientSecret - value: VX5LKeGHeaqKsgNz8Kn1gQ7MSHmwrXJdC2DMjVY82_YHjiRqdPrVNpFFkXBZy8yh + value: {{ .Values.auth.clientSecret }} - name: Stripe__WebHookSecret - value: 'whsec_I4tVknFRWurdaFnFzAVFEYGxJcVxsOYM' + value: '{{ .Values.stripe.webhookSecret }}' + - name: Stripe__ApiKey + value: '{{ .Values.stripe.apiKey }}' + - name: Novu__ApiKey + value: '{{ .Values.novu.apiKey }}' - name: Database__Host - value: '{{ .Values.postgresHost }}' + value: '{{ .Values.postgres.host }}' - name: Database__Port - value: '{{ .Values.postgresPort }}' + value: '{{ .Values.postgres.port }}' - name: Database__Database - value: '{{ .Values.postgresDatabase }}' + value: '{{ .Values.postgres.database }}' - name: Database__username - value: '{{ .Values.postgresUser }}' + value: '{{ .Values.postgres.user }}' - name: Database__password - value: '{{ .Values.postgresPassword }}' + value: '{{ .Values.postgres.password }}' ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/core-api/values.yaml b/charts/core-api/values.yaml index 40cb7ba..2147f26 100644 --- a/charts/core-api/values.yaml +++ b/charts/core-api/values.yaml @@ -38,12 +38,29 @@ securityContext: {} # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 +ui: + baseUrl: "http://localhost:3000" + +postgres: + host: "acid-minimal-cluster" + port : 5432 + user: "postgres" + password: "tbXeXzpmPK8l5e3DW6S3IXxzIO9CYCx0d5Ow0q50jgLyx0USEselZuC9JIuJi8Oo" + database: comissionsapp + +auth: + audience: "https://api.artplatform.com" + clientId: "19GWUL7fWFQWEpdFFtlgv2x3kqfSa0ES" + clientSecret: "VX5LKeGHeaqKsgNz8Kn1gQ7MSHmwrXJdC2DMjVY82_YHjiRqdPrVNpFFkXBZy8yh" + domain: "https://dev-12mb5yq82dow1twh.us.auth0.com/" + +stripe: + apiKey: "sk_test_51OdJ1SLooS0IZqYkx2IdNoLcscm6BisgaUyYVIc5jM1RMmarww2e9hLLQS3Atn6TQi00p9YQkCLGQPhAI2gf9ZSY00HmbQYCvP" + webhookSecret: "whsec_WTxw2seQHaJjSbLiRr1q8fs1wh8vGdGn" + +novu: + apiKey: "287ad99d1cbeba7f96a7d2637b022e6f" -postgresHost : "acid-minimal-cluster" -postgresPort : 5432 -postgresUser: "postgres" -postgresPassword: "tbXeXzpmPK8l5e3DW6S3IXxzIO9CYCx0d5Ow0q50jgLyx0USEselZuC9JIuJi8Oo" -postgresDatabase: comissionsapp service: type: ClusterIP port: 8080 diff --git a/charts/ui/templates/deployment.yaml b/charts/ui/templates/deployment.yaml index 6f44f65..5c13ea1 100644 --- a/charts/ui/templates/deployment.yaml +++ b/charts/ui/templates/deployment.yaml @@ -46,7 +46,13 @@ spec: - name: AUTH0_BASE_URL value: '{{ .Values.auth.baseUrl }}' - name: AUTH0_SECRET - value: '{{ .Values.auth.clientSecret }}' + value: '{{ .Values.auth.secret }}' + - name: AUTH0_AUDIENCE + value: '{{ .Values.auth.audience }}' + - name: AUTH0_SCOPE + value: '{{ .Values.auth.scope }}' + - name: NEXT_PUBLIC_API_URL + value: '{{ .Values.publicApiUrl }}' ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/ui/values.yaml b/charts/ui/values.yaml index 7f8a5d3..dcaa87f 100644 --- a/charts/ui/values.yaml +++ b/charts/ui/values.yaml @@ -1,14 +1,17 @@ # Default values for ui. # This is a YAML-formatted file. # Declare variables to be passed into your templates. - replicaCount: 1 +publicApiUrl: "https://core-api.development.comissions.app" auth: issuerBaseUrl: "https://dev-12mb5yq82dow1twh.us.auth0.com" clientId: "U39Jg6oyFoNihzjZ24SX2FxiBx2lqvsC" clientSecret: "UBH4HTsvkoWHImQwI4abyh46s6qpEnD3hfrODEYBTX7p_5v0bYogz-b_6wJtOkDg" baseUrl: "https://development.comissions.app" + secret: "U39Jg6oyFoNihzjZ24SX2FxiBx2lqvsC" + audience: "https://api.artplatform.com" + scope: "openid profile email read:user write:user read:request write:request read:artist write:artist" image: repository: docker pull ghcr.io/comissions-app/ui diff --git a/dev/.config/config.json b/dev/.config/config.json index 4821879..9a58833 100644 --- a/dev/.config/config.json +++ b/dev/.config/config.json @@ -1,21 +1,16 @@ { - "deployment": { - "argocd": { - "project": "comissions.app" - }, - "cluster": { - "name": "in-cluster", - "namespace": "comissions-dev", - "address": "https://kubernetes.default.svc" - } + "deployment": { + "argocd": { + "project": "default" }, - "apps": { - "core-api": { - "version" : "latest", - "image": "ghcr.io/comissions-app/core-api", - "ingress":{ - "host": "core-api.comissions-dev.com" - } - } + "cluster": { + "name": "in-cluster", + "namespace": "comissions-dev", + "address": "https://kubernetes.default.svc" } - } \ No newline at end of file + }, + "apps": + { + + } +} \ No newline at end of file diff --git a/dev/apps/core-api.yaml b/dev/apps/core-api.yaml index 1886519..b2b96d3 100644 --- a/dev/apps/core-api.yaml +++ b/dev/apps/core-api.yaml @@ -23,11 +23,30 @@ spec: path: charts/core-api helm: values: | - postgresHost: "postgres-postgresql" - postgresPort: 5432 - postgresUsername: "postgres" - postgresPassword: "postgres" - postgresDatabase: "comissionsapp" + postgres: + host: "postgres-postgresql" + port: 5432 + username: "postgres" + password: "postgres" + database: "comissionsapp" + + ui: + baseUrl: "http://development.comissions.app" + + auth: + audience: "https://api.artplatform.com" + clientId: "19GWUL7fWFQWEpdFFtlgv2x3kqfSa0ES" + clientSecret: "VX5LKeGHeaqKsgNz8Kn1gQ7MSHmwrXJdC2DMjVY82_YHjiRqdPrVNpFFkXBZy8yh" + domain: "https://dev-12mb5yq82dow1twh.us.auth0.com/" + + stripe: + apiKey: "sk_test_51OdJ1SLooS0IZqYkx2IdNoLcscm6BisgaUyYVIc5jM1RMmarww2e9hLLQS3Atn6TQi00p9YQkCLGQPhAI2gf9ZSY00HmbQYCvP" + webhookSecret: "whsec_WTxw2seQHaJjSbLiRr1q8fs1wh8vGdGn" + + novu: + apiKey: "287ad99d1cbeba7f96a7d2637b022e6f" + + image: repository: ghcr.io/comissions-app/core-api pullPolicy: Always diff --git a/dev/apps/ui.yaml b/dev/apps/ui.yaml index 2810dff..f2de31d 100644 --- a/dev/apps/ui.yaml +++ b/dev/apps/ui.yaml @@ -23,11 +23,17 @@ spec: path: charts/ui helm: values: | - auth: - issuerBaseUrl: "https://dev-12mb5yq82dow1twh.us.auth0.com" - clientId: "U39Jg6oyFoNihzjZ24SX2FxiBx2lqvsC" - clientSecret: "UBH4HTsvkoWHImQwI4abyh46s6qpEnD3hfrODEYBTX7p_5v0bYogz-b_6wJtOkDg" - baseUrl: "https://development.comissions.app" + publicApiUrl: "https://core-api.development.comissions.app" + + auth: + issuerBaseUrl: "https://dev-12mb5yq82dow1twh.us.auth0.com" + clientId: "U39Jg6oyFoNihzjZ24SX2FxiBx2lqvsC" + clientSecret: "UBH4HTsvkoWHImQwI4abyh46s6qpEnD3hfrODEYBTX7p_5v0bYogz-b_6wJtOkDg" + baseUrl: "https://development.comissions.app" + secret: "U39Jg6oyFoNihzjZ24SX2FxiBx2lqvsC" + audience: "https://api.artplatform.com" + scope: "openid profile email read:user write:user read:request write:request read:artist write:artist" + image: repository: ghcr.io/comissions-app/ui