File tree Expand file tree Collapse file tree 2 files changed +34
-33
lines changed
charts/cluster/test/paradedb-minio-backup-restore Expand file tree Collapse file tree 2 files changed +34
-33
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ServiceAccount
3
+ metadata :
4
+ name : configmap-creator-sa
5
+ ---
6
+ apiVersion : rbac.authorization.k8s.io/v1
7
+ kind : Role
8
+ metadata :
9
+ name : configmap-creator
10
+ rules :
11
+ - apiGroups : [""]
12
+ resources : ["configmaps"]
13
+ verbs : ["create"]
14
+ ---
15
+ apiVersion : rbac.authorization.k8s.io/v1
16
+ kind : RoleBinding
17
+ metadata :
18
+ name : configmap-creator-binding
19
+ subjects :
20
+ - kind : ServiceAccount
21
+ name : configmap-creator-sa
22
+ roleRef :
23
+ kind : Role
24
+ name : configmap-creator
25
+ apiGroup : rbac.authorization.k8s.io
26
+ ---
1
27
apiVersion : batch/v1
2
28
kind : Job
3
29
metadata :
4
30
name : data-write
5
31
spec :
6
32
template :
7
33
spec :
34
+ serviceAccountName : configmap-creator-sa
8
35
restartPolicy : OnFailure
9
36
containers :
10
37
- name : data-write
18
45
command : ['sh', '-c']
19
46
args :
20
47
- |
21
- apk --no-cache add postgresql-client kubectl
48
+ apk --no-cache add postgresql-client kubectl coreutils
22
49
DB_URI=$(echo $DB_URI | sed "s|/\*|/|" )
23
50
psql "$DB_URI" -c "CREATE TABLE mygoodtable (id serial PRIMARY KEY);"
51
+ sleep 5
52
+ DATE_NO_BAD_TABLE=$(date --rfc-3339=ns)
53
+ kubectl create configmap date-no-bad-table --from-literal=date="$DATE_NO_BAD_TABLE"
54
+ sleep 5
Original file line number Diff line number Diff line change 1
- apiVersion : v1
2
- kind : ServiceAccount
3
- metadata :
4
- name : configmap-creator-sa
5
- ---
6
- apiVersion : rbac.authorization.k8s.io/v1
7
- kind : Role
8
- metadata :
9
- name : configmap-creator
10
- rules :
11
- - apiGroups : [""]
12
- resources : ["configmaps"]
13
- verbs : ["create"]
14
- ---
15
- apiVersion : rbac.authorization.k8s.io/v1
16
- kind : RoleBinding
17
- metadata :
18
- name : configmap-creator-binding
19
- subjects :
20
- - kind : ServiceAccount
21
- name : configmap-creator-sa
22
- roleRef :
23
- kind : Role
24
- name : configmap-creator
25
- apiGroup : rbac.authorization.k8s.io
26
- ---
27
1
apiVersion : batch/v1
28
2
kind : Job
29
3
metadata :
30
4
name : data-write-post-backup
31
5
spec :
32
6
template :
33
7
spec :
34
- serviceAccountName : configmap-creator-sa
35
8
restartPolicy : OnFailure
36
9
containers :
37
10
- name : data-write
49
22
command : ['sh', '-c']
50
23
args :
51
24
- |
52
- apk --no-cache add postgresql-client kubectl coreutils
25
+ apk --no-cache add postgresql-client
53
26
DB_URI=$(echo $DB_URI | sed "s|/\*|/|" )
54
- DATE_NO_BAD_TABLE=$(date --rfc-3339=ns)
55
- sleep 30
56
- psql "$DB_URI" -c "CREATE TABLE mybadtable (id serial PRIMARY KEY);"
57
- kubectl create configmap date-no-bad-table --from-literal=date="$DATE_NO_BAD_TABLE"
27
+ psql "$DB_URI" -c "CREATE TABLE mybadtable (id serial PRIMARY KEY);"
You can’t perform that action at this time.
0 commit comments