Skip to content

Commit 96f1164

Browse files
author
Jeff McCormick
committed
update helm chart for 2.6
1 parent 06de62d commit 96f1164

25 files changed

+1640
-167
lines changed

chart/postgres-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
description: CrunchyData Postgres Operator Helm chart
33
name: postgres-operator
44
version: 0.1.3
5-
appVersion: 2.5
5+
appVersion: 2.6
66
keywords:
77
- postgres
88
- database

chart/postgres-operator/files/apiserver/pgo.yaml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
11
Namespace: demo
22
Cluster:
33
CCPImagePrefix: crunchydata
4-
CCPImageTag: centos7-10.1-1.7.0
4+
CCPImageTag: centos7-10.2-1.8.0
55
Port: 5432
6-
PrimaryPassword: password
76
User: testuser
8-
Password: password
9-
RootPassword: password
107
Database: userdb
118
PasswordAgeDays: 60
129
PasswordLength: 8
1310
Strategy: 1
1411
Replicas: 0
15-
PrimaryStorage:
16-
AccessMode: ReadWriteMany
17-
Size: 200M
18-
StorageType: create
19-
BackupStorage:
20-
AccessMode: ReadWriteMany
21-
Size: 200M
22-
StorageType: create
23-
ReplicaStorage:
24-
AccessMode: ReadWriteMany
25-
Size: 200M
26-
StorageType: create
12+
PrimaryStorage: storage1
13+
BackupStorage: storage1
14+
ReplicaStorage: storage1
15+
Storage:
16+
storage1:
17+
AccessMode: ReadWriteMany
18+
Size: 200M
19+
StorageType: create
20+
SupplementalGroups: 65534
21+
storage2:
22+
AccessMode: ReadWriteMany
23+
Size: 333M
24+
StorageType: create
25+
storage3:
26+
AccessMode: ReadWriteMany
27+
Size: 440M
28+
StorageType: create
29+
DefaultContainerResource: small
30+
ContainerResources:
31+
small:
32+
RequestsMemory: 512Mi
33+
RequestsCPU: 0.1
34+
LimitsMemory: 512Mi
35+
LimitsCPU: 0.1
36+
large:
37+
RequestsMemory: 2Gi
38+
RequestsCPU: 2.0
39+
LimitsMemory: 2Gi
40+
LimitsCPU: 4.0
2741
Pgo:
42+
Audit: false
43+
Metrics: false
2844
LSPVCTemplate: /config/pgo.lspvc-template.json
2945
LoadTemplate: /config/pgo.load-template.json
3046
COImagePrefix: crunchydata
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pgoadmin: ShowCluster, CreateCluster, TestCluster, ShowBackup, DeleteBackup, CreateBackup, Label, Load, CreatePolicy, DeletePolicy, ShowPolicy, ApplyPolicy, ShowPVC, CreateUpgrade, ShowUpgrade, DeleteUpgrade, User, Version, CreateIngest, ShowIngest, DeleteIngest
2+
3+
pgoreader: ShowCluster, TestCluster, ShowBackup, ShowPolicy, ShowPVC, ShowUpgrade, Version
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
username:password
2-
testuser:testpass
1+
username:password:pgoadmin
2+
testuser:testpass:pgoadmin
3+
readonlyuser:testpass:pgoreader
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
JSON templates are stored in this directory, the postgres-operator
2+
will read these templates and use them for creating various Kube kinds

chart/postgres-operator/files/postgres-operator/backup-job.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
"containers": [{
2525
"name": "backup",
26-
"image": "crunchydata/crunchy-backup:{{.CCPImageTag}}",
26+
"image": "{{.CCPImagePrefix}}/crunchy-backup:{{.CCPImageTag}}",
2727
"volumeMounts": [{
2828
"mountPath": "/pgdata",
2929
"name": "pgdata",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"affinity": {
2+
"nodeAffinity": {
3+
"preferredDuringSchedulingIgnoredDuringExecution": [{
4+
"weight": 1,
5+
"preference": {
6+
"matchExpressions": [{
7+
"key": "kubernetes.io/hostname",
8+
"operator": "{{.OperatorValue}}",
9+
"values": [
10+
"{{.Node}}"
11+
]
12+
}]
13+
}
14+
}]
15+
}
16+
},
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"kind": "Deployment",
3+
"apiVersion": "extensions/v1beta1",
4+
"metadata": {
5+
"name": "{{.Name}}",
6+
"labels": {
7+
{{.OperatorLabels }}
8+
}
9+
},
10+
"spec": {
11+
"replicas": 1,
12+
"template": {
13+
"metadata": {
14+
"labels": {
15+
"name": "{{.Name}}",
16+
"primary": "true",
17+
"pg-cluster": "{{.ClusterName}}"
18+
}
19+
},
20+
"spec": {
21+
22+
{{.SecurityContext }}
23+
24+
"containers": [
25+
26+
{{.CollectAddon }}
27+
28+
{
29+
"name": "database",
30+
"image": "{{.CCPImagePrefix}}/crunchy-postgres:{{.CCPImageTag}}",
31+
"readinessProbe": {
32+
"exec": {
33+
"command": [
34+
"/opt/cpm/bin/readiness.sh"
35+
]
36+
},
37+
"initialDelaySeconds": 15,
38+
"timeoutSeconds": 8
39+
},
40+
41+
{{.ContainerResources }}
42+
43+
"env": [{
44+
"name": "PG_PRIMARY_PORT",
45+
"value": "{{.Port}}"
46+
}, {
47+
"name": "PG_MODE",
48+
"value": "primary"
49+
}, {
50+
"name": "PG_LOCALE",
51+
"value": "en_US.UTF8"
52+
}, {
53+
"name": "PGDATA_PATH_OVERRIDE",
54+
"value": "{{.DataPathOverride}}"
55+
}, {
56+
"name": "BACKUP_PATH",
57+
"value": "{{.BackupPath}}"
58+
}, {
59+
"name": "PG_DATABASE",
60+
"value": "{{.Database}}"
61+
}, {
62+
"name": "PGHOST",
63+
"value": "/tmp"
64+
}],
65+
"volumeMounts": [{
66+
"mountPath": "/pgdata",
67+
"name": "pgdata",
68+
"readOnly": false
69+
}, {
70+
"mountPath": "/backup",
71+
"name": "backup",
72+
"readOnly": true
73+
}, {
74+
"mountPath": "/pguser",
75+
"name": "user-volume"
76+
}, {
77+
"mountPath": "/pgprimary",
78+
"name": "primary-volume"
79+
}, {
80+
"mountPath": "/pgroot",
81+
"name": "root-volume"
82+
}, {
83+
"mountPath": "/pgwal",
84+
"name": "pgwal-volume"
85+
}, {
86+
"mountPath": "/pgconf",
87+
"name": "pgconf-volume"
88+
}, {
89+
"mountPath": "/recover",
90+
"name": "recover-volume"
91+
}, {
92+
"mountPath": "/backrestrepo",
93+
"name": "backrestrepo-volume"
94+
}
95+
96+
],
97+
98+
"ports": [{
99+
"containerPort": 5432,
100+
"protocol": "TCP"
101+
}],
102+
"resources": {},
103+
"imagePullPolicy": "IfNotPresent"
104+
}],
105+
"volumes": [{
106+
"name": "pgdata",
107+
{{.PVCName}}
108+
}, {
109+
"name": "backup",
110+
{{.BackupPVCName}}
111+
}, {
112+
"name": "user-volume",
113+
"secret": {
114+
"secretName": "{{.UserSecretName}}"
115+
}
116+
}, {
117+
"name": "primary-volume",
118+
"secret": {
119+
"secretName": "{{.PrimarySecretName}}"
120+
}
121+
}, {
122+
"name": "root-volume",
123+
"secret": {
124+
"secretName": "{{.RootSecretName}}"
125+
}
126+
}, {
127+
"name": "pgwal-volume",
128+
"emptyDir": { "medium": "Memory" }
129+
}, {
130+
"name": "backrestrepo-volume",
131+
"emptyDir": { "medium": "Memory" }
132+
}, {
133+
"name": "recover-volume",
134+
"emptyDir": { "medium": "Memory" }
135+
}, {
136+
"name": "pgconf-volume",
137+
{{.ConfVolume}}
138+
}
139+
140+
],
141+
142+
{{.NodeSelector}}
143+
144+
"restartPolicy": "Always",
145+
"dnsPolicy": "ClusterFirst"
146+
}
147+
},
148+
"strategy": {
149+
"type": "RollingUpdate",
150+
"rollingUpdate": {
151+
"maxUnavailable": 1,
152+
"maxSurge": 1
153+
}
154+
}
155+
}
156+
}
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"kind": "Deployment",
3+
"apiVersion": "extensions/v1beta1",
4+
"metadata": {
5+
"name": "{{.Name}}"
6+
},
7+
"spec": {
8+
"replicas": {{.Replicas}},
9+
"template": {
10+
"metadata": {
11+
"labels": {
12+
{{.OperatorLabels}}
13+
}
14+
},
15+
"spec": {
16+
17+
{{.SecurityContext}}
18+
19+
"containers": [{
20+
"name": "database",
21+
"image": "{{.CCPImagePrefix}}/crunchy-postgres:{{.CCPImageTag}}",
22+
23+
{{.ContainerResources }}
24+
25+
"env": [{
26+
"name": "PG_PRIMARY_PORT",
27+
"value": "{{.Port}}"
28+
}, {
29+
"name": "PG_PRIMARY_HOST",
30+
"value": "{{.PrimaryHost}}"
31+
}, {
32+
"name": "PG_MODE",
33+
"value": "replica"
34+
}, {
35+
"name": "PG_LOCALE",
36+
"value": "en_US.UTF8"
37+
}, {
38+
"name": "PG_DATABASE",
39+
"value": "{{.Database}}"
40+
}, {
41+
"name": "PGHOST",
42+
"value": "/tmp"
43+
}],
44+
"volumeMounts": [
45+
{
46+
"mountPath": "/pgdata",
47+
"name": "pgdata",
48+
"readOnly": false
49+
}, {
50+
"mountPath": "/pguser",
51+
"name": "user-volume"
52+
}, {
53+
"mountPath": "/pgprimary",
54+
"name": "primary-volume"
55+
}, {
56+
"mountPath": "/pgroot",
57+
"name": "root-volume"
58+
}, {
59+
"mountPath": "/pgwal",
60+
"name": "pgwal-volume"
61+
}, {
62+
"mountPath": "/backrestrepo",
63+
"name": "backrestrepo-volume"
64+
}, {
65+
"mountPath": "/recover",
66+
"name": "recover-volume"
67+
}, {
68+
"mountPath": "/pgconf",
69+
"name": "pgconf-volume"
70+
}
71+
],
72+
73+
"ports": [{
74+
"containerPort": 5432,
75+
"protocol": "TCP"
76+
}],
77+
"resources": {},
78+
"imagePullPolicy": "IfNotPresent"
79+
}],
80+
"volumes": [
81+
{
82+
"name": "pgdata",
83+
"persistentVolumeClaim": {
84+
"claimName": "{{.PVCName}}"
85+
}
86+
}, {
87+
"name": "user-volume",
88+
"secret": {
89+
"secretName": "{{.UserSecretName}}"
90+
}
91+
}, {
92+
"name": "primary-volume",
93+
"secret": {
94+
"secretName": "{{.PrimarySecretName}}"
95+
}
96+
}, {
97+
"name": "root-volume",
98+
"secret": {
99+
"secretName": "{{.RootSecretName}}"
100+
}
101+
}, {
102+
"name": "pgwal-volume",
103+
"emptyDir": { "medium": "Memory" }
104+
}, {
105+
"name": "backrestrepo-volume",
106+
"emptyDir": { "medium": "Memory" }
107+
}, {
108+
"name": "recover-volume",
109+
"emptyDir": { "medium": "Memory" }
110+
}, {
111+
"name": "pgconf-volume",
112+
"emptyDir": { "medium": "Memory" }
113+
}
114+
115+
],
116+
117+
{{.NodeSelector}}
118+
119+
"restartPolicy": "Always",
120+
"dnsPolicy": "ClusterFirst"
121+
}
122+
},
123+
"strategy": {
124+
"type": "RollingUpdate",
125+
"rollingUpdate": {
126+
"maxUnavailable": 1,
127+
"maxSurge": 1
128+
}
129+
}
130+
}
131+
}

0 commit comments

Comments
 (0)