Skip to content

Commit

Permalink
feat(workflows): install postgresql to kind cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
golobitch committed Apr 13, 2024
1 parent 67364f5 commit 3b0eb17
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion charts/rafiki-auth/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/rafiki-auth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ nodeEnv: development
logLevel: debug
enableManualMigrations: true
postgresql:
host: "postgres.example.com"
host: "postgresql"
port: 5432
username: "auth"
database: "auth"
Expand Down
2 changes: 1 addition & 1 deletion charts/rafiki-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/rafiki-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b0eb17

Please sign in to comment.