Skip to content

Commit

Permalink
fix: kontinuous config
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-van-woerkens committed Nov 28, 2024
1 parent 22d3e23 commit e1884cc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 41 deletions.
39 changes: 39 additions & 0 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,42 @@ api:
value: review
- name: BRANCH_NAME
value: "{{ .Values.global.branchSlug }}"

deactivate:
jobs-deactivate:
runs:
cleanup-bucket:
image: bitnami/rclone:latest
run: |
rclone purge remote:${BUCKET_NAME}/{{ .Values.global.branchSlug }}
checkout: false
env:
- name: RCLONE_CONFIG_REMOTE_TYPE
value: s3
- name: RCLONE_CONFIG_REMOTE_PROVIDER
value: Other
- name: RCLONE_CONFIG_REMOTE_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_access_key
- name: RCLONE_CONFIG_REMOTE_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_secret_key
- name: RCLONE_CONFIG_REMOTE_REGION
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_region
- name: RCLONE_CONFIG_REMOTE_ENDPOINT
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_endpoint
- name: BUCKET_NAME
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_name
3 changes: 3 additions & 0 deletions .kontinuous/env/preprod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ api:
volumeMounts:
- mountPath: /app/public/uploads
name: uploads
envFrom:
- secretRef:
name: ozensemble-dev-app-access-key
3 changes: 3 additions & 0 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ api:
limits:
cpu: "300m"
memory: "1Gi"
envFrom:
- secretRef:
name: ozensemble-prod-app-access-key

next-app:
host: ozensemble.fabrique.social.gouv.fr
Expand Down
42 changes: 1 addition & 41 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ api:
name: pg-app
- secretRef:
name: api
- secretRef:
name: ozensemble-dev-app-access-key

vars:
DATABASE_HOST: "$(PGHOST)"
DATABASE_PORT: "$(PGPORT)"
Expand Down Expand Up @@ -54,42 +53,3 @@ jobs:
with:
imagePackage: api
context: ./api

deactivate:
jobs-deactivate:
runs:
cleanup-bucket:
image: bitnami/rclone:latest
run: |
rclone purge remote:${BUCKET_NAME}/{{ .Values.global.branchSlug }}
checkout: false
env:
- name: RCLONE_CONFIG_REMOTE_TYPE
value: s3
- name: RCLONE_CONFIG_REMOTE_PROVIDER
value: Other
- name: RCLONE_CONFIG_REMOTE_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_access_key
- name: RCLONE_CONFIG_REMOTE_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_secret_key
- name: RCLONE_CONFIG_REMOTE_REGION
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_region
- name: RCLONE_CONFIG_REMOTE_ENDPOINT
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_endpoint
- name: BUCKET_NAME
valueFrom:
secretKeyRef:
name: ozensemble-dev-app-access-key
key: bucket_name

0 comments on commit e1884cc

Please sign in to comment.