You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.asciidoc
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ for the *postgres operator*.
7
7
8
8
== pgo Client Configuration
9
9
10
-
There is a configuration file named *.pgo.yaml* for the operator client. It
10
+
Sample pgo configuration files are located in the $COROOT/examples directory.
11
+
12
+
You will need to copy a sample to your $HOME/.pgo.yaml location. It
11
13
can be defined in the following locations:
12
14
13
15
* . (current directory)
@@ -19,7 +21,7 @@ The .pgo.yaml file location is checked in that order.
19
21
=== pgo Configuration Format
20
22
21
23
The sample pgo client configuration file, included in
22
-
*examples/sample.pgo.yaml*, looks like this:
24
+
*examples/pgo.yaml.emptydir*, looks like this:
23
25
24
26
[source,yaml]
25
27
....
@@ -34,22 +36,22 @@ CLUSTER:
34
36
PG_DATABASE: userdb
35
37
PG_ROOT_PASSWORD: password
36
38
STRATEGY: 1
37
-
REPLICAS: 2
39
+
REPLICAS: 0
38
40
POLICIES: policy1,policy2
39
41
MASTER_STORAGE:
40
42
PVC_NAME: crunchy-pvc
41
43
STORAGE_CLASS: standard
42
44
PVC_ACCESS_MODE: ReadWriteMany
43
45
PVC_SIZE: 100M
44
-
STORAGE_TYPE: shared
46
+
STORAGE_TYPE: emptydir
45
47
FSGROUP: 26
46
48
SUPPLEMENTALGROUPS: 65534
47
49
REPLICA_STORAGE:
48
50
PVC_NAME: crunchy-pvc
49
51
STORAGE_CLASS: standard
50
52
PVC_ACCESS_MODE: ReadWriteMany
51
53
PVC_SIZE: 100M
52
-
STORAGE_TYPE: shared
54
+
STORAGE_TYPE: emptydir
53
55
FSGROUP: 26
54
56
SUPPLEMENTALGROUPS: 65534
55
57
BACKUP_STORAGE:
@@ -89,21 +91,21 @@ Values in the pgo configuration file have the following meaning:
89
91
|MASTER_STORAGE.PVC_SIZE |for the master postgres deployment, the size to use when creating new PVCs (e.g. 100M, 1Gi)
90
92
|MASTER_STORAGE.STORAGE_TYPE |for the master postgres deployment, supported values are either *dynamic*, *existing*, *create*, or *emptydir*, if not supplied, *emptydir* is used
91
93
|MASTER_STORAGE.FSGROUP | optional, if set, will cause a *SecurityContext* and *fsGroup* attributes to be added to generated Pod and Deployment definitions
92
-
|MASTER_STORAGE.SUPPLEMENTALGROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
94
+
|MASTER_STORAGE.SUPPLEMENTAL_GROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
93
95
|REPLICA_STORAGE.PVC_NAME |for the replica postgres deployments, if set, the PVC to use for created databases, used when the storage type is *existing*
94
96
|REPLICA_STORAGE.STORAGE_CLASS |for the replica postgres deployment, for a dynamic storage type, you can specify the storage class used for storage provisioning(e.g. standard, gold, fast)
95
97
|REPLICA_STORAGE.PVC_ACCESS_MODE |for the replica postgres deployment, the access mode for new PVCs (e.g. ReadWriteMany, ReadWriteOnce)
96
98
|REPLICA_STORAGE.PVC_SIZE |for the replica postgres deployment, the size to use when creating new PVCs (e.g. 100M, 1Gi)
97
99
|REPLICA_STORAGE.STORAGE_TYPE |for the replica postgres deployment, supported values are either *dynamic*, *existing*, *create*, or *emptydir*, if not supplied, *emptydir* is used
98
100
|REPLICA_STORAGE.FSGROUP | optional, if set, will cause a *SecurityContext* and *fsGroup* attributes to be added to generated Pod and Deployment definitions
99
-
|REPLICA_STORAGE.SUPPLEMENTALGROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
101
+
|REPLICA_STORAGE.SUPPLEMENTAL_GROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
100
102
|BACKUP_STORAGE.PVC_NAME |for the backup job, if set, the PVC to use for holding backup files, used when the storage type is *existing*
101
103
|BACKUP_STORAGE.STORAGE_CLASS |for the backup job, for a dynamic storage type, you can specify the storage class used for storage provisioning(e.g. standard, gold, fast)
102
104
|BACKUP_STORAGE.PVC_ACCESS_MODE |for the backup job, the access mode for new PVCs (e.g. ReadWriteMany, ReadWriteOnce)
103
105
|BACKUP_STORAGE.PVC_SIZE |for the backup job, the size to use when creating new PVCs (e.g. 100M, 1Gi)
104
106
|BACKUP_STORAGE.STORAGE_TYPE |for the backup job , supported values are either *dynamic*, *existing*, *create*, or *emptydir*, if not supplied, *emptydir* is used
105
107
|BACKUP_STORAGE.FSGROUP | optional, if set, will cause a *SecurityContext* and *fsGroup* attributes to be added to generated Pod and Deployment definitions
106
-
|BACKUP_STORAGE.SUPPLEMENTALGROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
108
+
|BACKUP_STORAGE.SUPPLEMENTAL_GROUPS | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
107
109
|PGO.LSPVC_TEMPLATE | the PVC lspvc template file used to view PVCs
108
110
|PGO.CO_IMAGE_TAG | image tag to use for the PostgreSQL operator containers
109
111
|PGO.DEBUG | set to true if you want to see debug messages from the pgo client
@@ -122,6 +124,8 @@ That script will also create a PV named *crunchy-pv* using a HostPath of */data*
122
124
only for testing the operator, edit or remove the PV/PVC creation
123
125
to meet your requirements.
124
126
127
+
You can also create NFS PV(s) using the create-pv-nfs.sh script.
128
+
125
129
To enable DEBUG messages from the operator pod, set the *DEBUG* environment
126
130
variable to *true* within its deployment file *deployment.json*.
127
131
@@ -186,3 +190,15 @@ pgo create cluster example1
186
190
It will result in a PVC being created named *example1-pvc* and in
187
191
the case of a backup job, the pvc is named *example1-backup-pvc*
188
192
193
+
There are currently 3 sample pgo configuration files provided
194
+
for users to use as a starting configuration:
195
+
196
+
* pgo.yaml.emptydir - this configuration specifies *emptydir* storage
197
+
to be used for databases
198
+
* pgo.yaml.nfs - this configuration specifies *create* storage to
199
+
be used, this is used for NFS storage for example where you want to
200
+
have a unique PVC created for each database
201
+
* pgo.yaml.dynamic - this configuration specifies *dynamic* storage
202
+
to be used, namely a *storageclass* that refers to a dynamic provisioning
0 commit comments