Skip to content

Commit

Permalink
fix: pvc (#109)
Browse files Browse the repository at this point in the history
* fix: pvc

* fix: image tag on pr-deploy
  • Loading branch information
mishraomp authored Jan 27, 2025
1 parent 214a98e commit ae2abae
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ concurrency:
cancel-in-progress: true

jobs:
vars:
name: Set Variables
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
# Get PR number for squash merges to main
- name: PR Number
id: pr
uses: bcgov/[email protected]
- name: Metabase Version
id: metabase_version
run: |
appVersion=$(yq '.metabase.metabaseImage.tag' charts/nr-metabase/values.yaml)
echo "app version is $appVersion"
echo "app_version=$appVersion" >> "$GITHUB_OUTPUT"
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/metabase
target: ${{ steps.pr.outputs.pr }}
tags: |
${{ steps.metabase_version.outputs.app_version }}
helm-release:
runs-on: ubuntu-24.04
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-pr-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
repository: ${{ github.repository }}/metabase
target: ${{ github.sha }}
tags: |
pr-${{ github.event.number }}
${{ needs.extract_version.outputs.app_version }}
${{ github.event.number }}
Expand All @@ -85,4 +85,4 @@ jobs:
oc project ${{ vars.oc_namespace }}
# Deploy Helm Chart
helm upgrade --install --wait --atomic nr-metabase-${{ github.event.number }} --set-string global.secrets.databasePassword=${{ secrets.DB_PASSWORD}} --set-string global.zone="${{ github.event.number }}" --set-string metabase.image.tag=${{ github.sha }} --set namespace=${{ vars.oc_namespace }} --timeout 5m charts/nr-metabase --debug
helm upgrade --install --wait --atomic nr-metabase-${{ github.event.number }} --set-string global.secrets.databasePassword=${{ secrets.DB_PASSWORD}} --set-string global.zone="${{ github.event.number }}" --set-string metabase.metabaseImage.tag=${{ github.sha }} --set namespace=${{ vars.oc_namespace }} --timeout 5m charts/nr-metabase --debug
10 changes: 5 additions & 5 deletions charts/nr-metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ database:
fullnameOverride: ""
deploymentStrategy: Recreate
image:
repository: ghcr.io/bcgov/nr-containers/postgres
repository: artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/nr-containers/postgres
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: '15.10'
Expand All @@ -74,8 +74,8 @@ database:
persistence:
enabled: true
size: 740Mi
accessMode: ReadWriteMany
storageClass: netapp-file-standard
accessMode: ReadWriteOnce
storageClass: netapp-block-standard
backup:
enabled: true
nameOverride: ""
Expand All @@ -90,8 +90,8 @@ backup:
- ReadWriteOnce
mountPath: "/backups/"
size: 256Mi #Volume space available for data, e.g. 512Mi, 2Gi.
storageClass: "netapp-block-standard"
schedule: "0 0 * * *" # cron job schedule
storageClass: "netapp-file-backup"
schedule: "0 0/4 * * *" # cron job schedule
strategy: "rolling" # daily or rolling
numBackups: 5 # The number of backup files to be retained. Used for the `daily` backup strategy. Ignored when using the `rolling` backup strategy.
dailyBackups: 7 # The number of daily backup files to be retained. Used for the `rolling` backup strategy.
Expand Down

0 comments on commit ae2abae

Please sign in to comment.