misc: #15 use one redis per environment on staging (#16)

* misc: add redis for preview branches

* use new redis url
This commit is contained in:
Jérémy Denquin 2022-05-04 14:58:55 +02:00 committed by GitHub
parent b2a3725091
commit d602b35db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -38,4 +38,5 @@ jobs:
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-app
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-api
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-worker
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-clock
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-clock
helm --kubeconfig ./kubeconfig.yaml uninstall ${{ github.event.inputs.preview_name }}-redis

View File

@ -177,7 +177,7 @@ jobs:
BRANCH: ${{ github.event.inputs.api_branch }}
DATABASE_URL: postgres://lago:${{ secrets.DB_STAGING_PASSWORD }}@${{ secrets.DB_STAGING_HOST}}:5432/${{ github.event.inputs.preview_name }}
DOMAIN: ${{ github.event.inputs.preview_name }}
REDIS_URL: redis://${{ secrets.REDIS_STAGING_URL }}
REDIS_URL: redis://${{ github.event.inputs.preview_name }}-redis-master.default.svc.cluster.local:6379
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: |
@ -186,6 +186,13 @@ jobs:
envsubst < ./api/porter/clock.yaml > ./api/porter/env_clock.yaml
- name: Configure kubectl
run: echo "${{ secrets.KUBE_STAGING_CONFIG }}" | base64 -d > kubeconfig.yaml
- name: Get Helm Redis deployment
id: helm_redis_deployment
run: echo "::set-output name=deployment::$(helm --kubeconfig ./kubeconfig.yaml list -f ${{ github.event.inputs.preview_name }}-redis -o=json | jq '.[0].name)"
- name: Create Redis deployment
if: ${{ steps.helm_deployment.outputs.deployment == 'null' }}
run: |
helm --kubeconfig ./kubeconfig.yaml install ${{ github.event.inputs.preview_name }}-redis bitnami/redis
- name: Get Helm API deployment
id: helm_deployment
run: echo "::set-output name=deployment::$(helm --kubeconfig ./kubeconfig.yaml list -f ${{ github.event.inputs.preview_name }}-api -o=json | jq '.[0].name')"

2
api

@ -1 +1 @@
Subproject commit 9f0b55d6572c9c43508f89e957155574bbd4d071
Subproject commit 3966472b73325394420b4b43c35fea12e2457d76