This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuse.yaml
46 lines (45 loc) · 1.66 KB
/
use.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
runs:
- name: create-secret
checkout: false
image: bitnami/kubectl:latest
user: 1001
envFrom:
- secretRef:
name: "{{ tpl (or $.with.pgAdminSecretRefName $.parentWith.pgAdminSecretRefName) . }}"
- secretRef:
name: kubeconfig
vars:
DB_SECRET_NAME: "{{ tpl (or $.with.pgSecretName $.Values.global.pgSecretName) . }}"
NAMESPACE: "{{ $.Values.global.namespace }}"
JOB_NAMESPACE: "{{ $.Values.global.jobNamespace }}"
PGDATABASE: "{{ tpl (or $.with.database $.Values.global.pgDatabase) . }}"
PGUSER: "{{ tpl (or $.with.pgUser $.Values.global.pgUser) . }}"
run: /action/create-secret.sh
- name: create-db
needs: [create-secret]
checkout: false
image: ghcr.io/socialgouv/docker/psql:6.70.0
envFrom:
- secretRef:
name: "{{ tpl (or $.with.pgAdminSecretRefName $.parentWith.pgAdminSecretRefName) . }}"
env:
- name: NEW_DB_NAME
value: "{{ tpl (or $.with.database $.Values.global.pgDatabase) . }}"
- name: NEW_USER
valueFrom:
secretKeyRef:
key: PGUSER
name: "{{ tpl (or $.with.pgSecretName $.Values.global.pgSecretName) . }}"
- name: NEW_PASSWORD
valueFrom:
secretKeyRef:
key: PGPASSWORD
name: "{{ tpl (or $.with.pgSecretName $.Values.global.pgSecretName) . }}"
- name: PGHOST
valueFrom:
secretKeyRef:
key: PGHOST
name: "{{ tpl (or $.with.pgSecretName $.Values.global.pgSecretName) . }}"
- name: NEW_DB_EXTENSIONS
value: "hstore pgcrypto citext uuid-ossp postgis pg_trgm unaccent"
run: /action/ensure-db.sh