Skip to content

Commit 4435651

Browse files
authored
Custom UID for Postgres (#293)
Fix: Add securitycontext field in PostgresVersion catalog Signed-off-by: Emon46 <emon@appscode.com>
1 parent 1658fb2 commit 4435651

20 files changed

+455
-84
lines changed

catalog/active_versions.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,17 @@
109109
"Postgres": [
110110
"timescaledb-2.1.0-pg13",
111111
"13.2",
112+
"13.2-debian",
112113
"timescaledb-2.1.0-pg12",
113114
"12.6",
115+
"12.6-debian",
114116
"timescaledb-2.1.0-pg11",
115117
"11.11",
118+
"11.11-debian",
116119
"10.16",
117-
"9.6.21"
120+
"10.16-debian",
121+
"9.6.21",
122+
"9.6.21-debian"
118123
],
119124
"ProxySQL": [
120125
"2.0.4"

catalog/backup_tasks.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,26 @@
121121
"5.7-cluster"
122122
],
123123
"postgres-backup-10.14": [
124-
"10.16"
124+
"10.16",
125+
"10.16-debian"
125126
],
126127
"postgres-backup-11.9": [
127128
"timescaledb-2.1.0-pg11",
128-
"11.11"
129+
"11.11",
130+
"11.11-debian"
129131
],
130132
"postgres-backup-12.4": [
131133
"timescaledb-2.1.0-pg12",
132-
"12.6"
134+
"12.6",
135+
"12.6-debian"
133136
],
134137
"postgres-backup-13.1": [
135138
"timescaledb-2.1.0-pg13",
136-
"13.2"
139+
"13.2",
140+
"13.2-debian"
137141
],
138142
"postgres-backup-9.6.19": [
139-
"9.6.21"
143+
"9.6.21",
144+
"9.6.21-debian"
140145
]
141146
}

catalog/raw/postgres/postgres-10.16-postgresql.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
apiVersion: catalog.kubedb.com/v1alpha1
22
kind: PostgresVersion
3+
metadata:
4+
name: 10.16-debian
5+
spec:
6+
coordinator:
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
8+
db:
9+
image: postgres:10.16
10+
distribution: PostgreSQL
11+
exporter:
12+
image: prometheuscommunity/postgres-exporter:v0.9.0
13+
initContainer:
14+
image: kubedb/postgres-init:0.2.0
15+
podSecurityPolicies:
16+
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: true
19+
runAsUser: 999
20+
stash:
21+
addon:
22+
backupTask:
23+
name: postgres-backup-10.14
24+
restoreTask:
25+
name: postgres-restore-10.14
26+
version: "10.16"
27+
28+
---
29+
apiVersion: catalog.kubedb.com/v1alpha1
30+
kind: PostgresVersion
331
metadata:
432
name: "10.16"
533
spec:
634
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
35+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
836
db:
937
image: postgres:10.16-alpine
1038
distribution: PostgreSQL
1139
exporter:
1240
image: prometheuscommunity/postgres-exporter:v0.9.0
1341
initContainer:
14-
image: kubedb/postgres-init:0.1.0
42+
image: kubedb/postgres-init:0.2.0
1543
podSecurityPolicies:
1644
databasePolicyName: postgres-db
45+
securityContext:
46+
runAsAnyNonRoot: false
47+
runAsUser: 70
1748
stash:
1849
addon:
1950
backupTask:

catalog/raw/postgres/postgres-11.11-postgresql.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
apiVersion: catalog.kubedb.com/v1alpha1
22
kind: PostgresVersion
3+
metadata:
4+
name: 11.11-debian
5+
spec:
6+
coordinator:
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
8+
db:
9+
image: postgres:11.11
10+
distribution: PostgreSQL
11+
exporter:
12+
image: prometheuscommunity/postgres-exporter:v0.9.0
13+
initContainer:
14+
image: kubedb/postgres-init:0.2.0
15+
podSecurityPolicies:
16+
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: true
19+
runAsUser: 999
20+
stash:
21+
addon:
22+
backupTask:
23+
name: postgres-backup-11.9
24+
restoreTask:
25+
name: postgres-restore-11.9
26+
version: "11.11"
27+
28+
---
29+
apiVersion: catalog.kubedb.com/v1alpha1
30+
kind: PostgresVersion
331
metadata:
432
name: "11.11"
533
spec:
634
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
35+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
836
db:
937
image: postgres:11.11-alpine
1038
distribution: PostgreSQL
1139
exporter:
1240
image: prometheuscommunity/postgres-exporter:v0.9.0
1341
initContainer:
14-
image: kubedb/postgres-init:0.1.0
42+
image: kubedb/postgres-init:0.2.0
1543
podSecurityPolicies:
1644
databasePolicyName: postgres-db
45+
securityContext:
46+
runAsAnyNonRoot: false
47+
runAsUser: 70
1748
stash:
1849
addon:
1950
backupTask:

catalog/raw/postgres/postgres-11.11-timescaledb.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ metadata:
44
name: timescaledb-2.1.0-pg11
55
spec:
66
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
88
db:
99
image: timescale/timescaledb:2.1.0-pg11-oss
1010
distribution: TimescaleDB
1111
exporter:
1212
image: prometheuscommunity/postgres-exporter:v0.9.0
1313
initContainer:
14-
image: kubedb/postgres-init:0.1.0
14+
image: kubedb/postgres-init:0.2.0
1515
podSecurityPolicies:
1616
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: false
19+
runAsUser: 70
1720
stash:
1821
addon:
1922
backupTask:

catalog/raw/postgres/postgres-12.6-postgresql.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
apiVersion: catalog.kubedb.com/v1alpha1
22
kind: PostgresVersion
3+
metadata:
4+
name: 12.6-debian
5+
spec:
6+
coordinator:
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
8+
db:
9+
image: postgres:12.6
10+
distribution: PostgreSQL
11+
exporter:
12+
image: prometheuscommunity/postgres-exporter:v0.9.0
13+
initContainer:
14+
image: kubedb/postgres-init:0.2.0
15+
podSecurityPolicies:
16+
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: true
19+
runAsUser: 999
20+
stash:
21+
addon:
22+
backupTask:
23+
name: postgres-backup-12.4
24+
restoreTask:
25+
name: postgres-restore-12.4
26+
version: "12.6"
27+
28+
---
29+
apiVersion: catalog.kubedb.com/v1alpha1
30+
kind: PostgresVersion
331
metadata:
432
name: "12.6"
533
spec:
634
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
35+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
836
db:
937
image: postgres:12.6-alpine
1038
distribution: PostgreSQL
1139
exporter:
1240
image: prometheuscommunity/postgres-exporter:v0.9.0
1341
initContainer:
14-
image: kubedb/postgres-init:0.1.0
42+
image: kubedb/postgres-init:0.2.0
1543
podSecurityPolicies:
1644
databasePolicyName: postgres-db
45+
securityContext:
46+
runAsAnyNonRoot: false
47+
runAsUser: 70
1748
stash:
1849
addon:
1950
backupTask:

catalog/raw/postgres/postgres-12.6-timescaledb.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ metadata:
44
name: timescaledb-2.1.0-pg12
55
spec:
66
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
88
db:
99
image: timescale/timescaledb:2.1.0-pg12-oss
1010
distribution: TimescaleDB
1111
exporter:
1212
image: prometheuscommunity/postgres-exporter:v0.9.0
1313
initContainer:
14-
image: kubedb/postgres-init:0.1.0
14+
image: kubedb/postgres-init:0.2.0
1515
podSecurityPolicies:
1616
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: false
19+
runAsUser: 70
1720
stash:
1821
addon:
1922
backupTask:

catalog/raw/postgres/postgres-13.2-postgresql.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
apiVersion: catalog.kubedb.com/v1alpha1
22
kind: PostgresVersion
3+
metadata:
4+
name: 13.2-debian
5+
spec:
6+
coordinator:
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
8+
db:
9+
image: postgres:13.2
10+
distribution: PostgreSQL
11+
exporter:
12+
image: prometheuscommunity/postgres-exporter:v0.9.0
13+
initContainer:
14+
image: kubedb/postgres-init:0.2.0
15+
podSecurityPolicies:
16+
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: true
19+
runAsUser: 999
20+
stash:
21+
addon:
22+
backupTask:
23+
name: postgres-backup-13.1
24+
restoreTask:
25+
name: postgres-restore-13.1
26+
version: "13.2"
27+
28+
---
29+
apiVersion: catalog.kubedb.com/v1alpha1
30+
kind: PostgresVersion
331
metadata:
432
name: "13.2"
533
spec:
634
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
35+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
836
db:
937
image: postgres:13.2-alpine
1038
distribution: PostgreSQL
1139
exporter:
1240
image: prometheuscommunity/postgres-exporter:v0.9.0
1341
initContainer:
14-
image: kubedb/postgres-init:0.1.0
42+
image: kubedb/postgres-init:0.2.0
1543
podSecurityPolicies:
1644
databasePolicyName: postgres-db
45+
securityContext:
46+
runAsAnyNonRoot: false
47+
runAsUser: 70
1748
stash:
1849
addon:
1950
backupTask:

catalog/raw/postgres/postgres-13.2-timescaledb.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ metadata:
44
name: timescaledb-2.1.0-pg13
55
spec:
66
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
88
db:
99
image: timescale/timescaledb:2.1.0-pg13-oss
1010
distribution: TimescaleDB
1111
exporter:
1212
image: prometheuscommunity/postgres-exporter:v0.9.0
1313
initContainer:
14-
image: kubedb/postgres-init:0.1.0
14+
image: kubedb/postgres-init:0.2.0
1515
podSecurityPolicies:
1616
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: false
19+
runAsUser: 70
1720
stash:
1821
addon:
1922
backupTask:

catalog/raw/postgres/postgres-9.6.21-postgresql.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
11
apiVersion: catalog.kubedb.com/v1alpha1
22
kind: PostgresVersion
3+
metadata:
4+
name: 9.6.21-debian
5+
spec:
6+
coordinator:
7+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
8+
db:
9+
image: postgres:9.6.21
10+
distribution: PostgreSQL
11+
exporter:
12+
image: prometheuscommunity/postgres-exporter:v0.9.0
13+
initContainer:
14+
image: kubedb/postgres-init:0.2.0
15+
podSecurityPolicies:
16+
databasePolicyName: postgres-db
17+
securityContext:
18+
runAsAnyNonRoot: true
19+
runAsUser: 999
20+
stash:
21+
addon:
22+
backupTask:
23+
name: postgres-backup-9.6.19
24+
restoreTask:
25+
name: postgres-restore-9.6.19
26+
version: 9.6.21
27+
28+
---
29+
apiVersion: catalog.kubedb.com/v1alpha1
30+
kind: PostgresVersion
331
metadata:
432
name: 9.6.21
533
spec:
634
coordinator:
7-
image: kubedb/pg-coordinator:v0.1.1
35+
image: kubedb/pg-coordinator:custom-uid_linux_amd64
836
db:
937
image: postgres:9.6.21-alpine
1038
distribution: PostgreSQL
1139
exporter:
1240
image: prometheuscommunity/postgres-exporter:v0.9.0
1341
initContainer:
14-
image: kubedb/postgres-init:0.1.0
42+
image: kubedb/postgres-init:0.2.0
1543
podSecurityPolicies:
1644
databasePolicyName: postgres-db
45+
securityContext:
46+
runAsAnyNonRoot: false
47+
runAsUser: 70
1748
stash:
1849
addon:
1950
backupTask:

0 commit comments

Comments
 (0)