From 3b0eb175b18bc9539c05884ee70ae5f5510cbff9 Mon Sep 17 00:00:00 2001 From: golobitch Date: Sat, 13 Apr 2024 12:26:38 +0200 Subject: [PATCH] feat(workflows): install postgresql to kind cluster --- .github/workflows/lint-test.yaml | 27 +++++++++++++++++++++++++-- charts/rafiki-auth/Chart.yaml | 2 +- charts/rafiki-auth/values.yaml | 2 +- charts/rafiki-backend/Chart.yaml | 2 +- charts/rafiki-backend/values.yaml | 4 ++-- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index c2d6a63..941ebe4 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -33,13 +33,36 @@ jobs: fi - name: Run chart-testing (lint) - if: steps.list-changed.outputs.changed == 'true' + # if: steps.list-changed.outputs.changed == 'true' run: ct lint --target-branch ${{ github.event.repository.default_branch }} - name: Create kind cluster - if: steps.list-changed.outputs.changed == 'true' + # if: steps.list-changed.outputs.changed == 'true' uses: helm/kind-action@v1.9.0 + - name: Deploy + # if: steps.list-changed.outputs.changed == 'true' + run: | + tee -a values.ci.yaml << END + postgresql: + replication: + enabled: false + metrics: + enabled: false + primary: + initdb: + scripts: + initialize_backend.sql: | + CREATE USER backend PASSWORD 'backend'; + CREATE DATABASE backend OWNER backend; + initialize_auth.sql: | + CREATE USER auth PASSWORD 'auth'; + CREATE DATABASE auth OWNER auth; + persistence: + enabled: true + END + helm install postgresql oci://registry-1.docker.io/bitnamicharts/postgresql -f values.ci.yaml + - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true' run: ct install --target-branch ${{ github.event.repository.default_branch }} diff --git a/charts/rafiki-auth/Chart.yaml b/charts/rafiki-auth/Chart.yaml index 249af41..e70f95d 100644 --- a/charts/rafiki-auth/Chart.yaml +++ b/charts/rafiki-auth/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.1 +version: 0.4.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/rafiki-auth/values.yaml b/charts/rafiki-auth/values.yaml index 05b0708..468b83a 100644 --- a/charts/rafiki-auth/values.yaml +++ b/charts/rafiki-auth/values.yaml @@ -2,7 +2,7 @@ nodeEnv: development logLevel: debug enableManualMigrations: true postgresql: - host: "postgres.example.com" + host: "postgresql" port: 5432 username: "auth" database: "auth" diff --git a/charts/rafiki-backend/Chart.yaml b/charts/rafiki-backend/Chart.yaml index b069d6e..ebb58cf 100644 --- a/charts/rafiki-backend/Chart.yaml +++ b/charts/rafiki-backend/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.2 +version: 0.4.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/rafiki-backend/values.yaml b/charts/rafiki-backend/values.yaml index 2d17b61..64dd509 100644 --- a/charts/rafiki-backend/values.yaml +++ b/charts/rafiki-backend/values.yaml @@ -17,11 +17,11 @@ redis: tlsCertFile: '' tlsKeyFile: '' postgresql: - host: "postgres.example.com" + host: "postgresql" port: 5432 username: "backend" database: "backend" - password: "overridethisValue" + password: "backend" port: admin: 3001 connector: 3002