Skip to content

Commit

Permalink
fix: crunchy s3 missing (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-funk authored Jan 14, 2025
1 parent 8eb0cb4 commit fe996d8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/.dbdeployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ on:
s3_secret_key:
description: S3 secret key
required: false
s3_bucket:
description: S3 bucket
required: false
s3_endpoint:
description: S3 endpoint
required: false
jobs:
deploy_db:
timeout-minutes: ${{ inputs.timeout-minutes }}
Expand Down Expand Up @@ -100,6 +106,14 @@ jobs:
echo "S3 secret key not found"
exit 1
fi
if [ ! "${{ secrets.s3_bucket }}" ]; then
echo "S3 bucket not found"
exit 1
fi
if [ ! "${{ secrets.s3_endpoint }}" ]; then
echo "S3 endpoint not found"
exit 1
fi
fi
- name: OC Login
Expand All @@ -119,8 +133,10 @@ jobs:
echo 'Deploying crunchy helm chart'
if [ ${{ inputs.s3_enabled }} == true ]; then
helm upgrade ${{ inputs.params }} --install --wait --set crunchy.pgBackRest.s3.enabled=true \
--set-string crunchy.pgBackRest.s3.accessKey=${{ secrets.s3_access_key }} \
--set-string crunchy.pgBackRest.s3.accessKey=${{ secrets.s3_access_key }} \
--set-string crunchy.pgBackRest.s3.secretKey=${{ secrets.s3_secret_key }} \
--set-string crunchy.pgBackRest.s3.bucket=${{ secrets.s3_bucket }} \
--set-string crunchy.pgBackRest.s3.endpoint=${{ secrets.s3_endpoint }} \
--values ${{ inputs.values }} postgres .
else
helm upgrade ${{ inputs.params }} --install --wait --values ${{ inputs.values }} postgres .
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
s3_access_key: ${{ secrets.S3_ACCESS_KEY }}
s3_secret_key: ${{ secrets.S3_SECRET_KEY }}
s3_bucket: ${{ secrets.S3_BUCKET }}
s3_endpoint: ${{ secrets.S3_ENDPOINT }}

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-test:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ jobs:
uses: ./.github/workflows/.dbdeployer.yml
with:
params: --set global.environment=prod
--set crunchy.pgBackRest.backupPath=/backups/prod/cluster/version
cluster_environment: prod
environment: prod
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
s3_access_key: ${{ secrets.S3_ACCESS_KEY }}
s3_secret_key: ${{ secrets.S3_SECRET_KEY }}
s3_bucket: ${{ secrets.S3_BUCKET }}
s3_endpoint: ${{ secrets.S3_ENDPOINT }}

# https://github.com/bcgov/quickstart-openshift-helpers
deploy-prod:
Expand Down
4 changes: 2 additions & 2 deletions charts/crunchy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ crunchy: # enable it for TEST and PROD, for PR based pipelines simply use single
endpoint: ~
accessKey: ~
secretKey: ~
fullBackupSchedule: ~ # make sure to provide values here, if s3 is enabled.
incrementalBackupSchedule: ~ # make sure to provide values here, if s3 is enabled.
fullBackupSchedule: 0 8 * * * # make sure to provide values here, if s3 is enabled.
incrementalBackupSchedule: 0 0,12 * * * # make sure to provide values here, if s3 is enabled.
pvc:
retention: 1 # one day hot active backup in pvc
retentionFullType: count
Expand Down

0 comments on commit fe996d8

Please sign in to comment.