add documentation and validation for new manifest fields

This commit is contained in:
Felix Kunde 2021-01-06 11:38:11 +01:00 committed by Jan Mußler
parent 679a497837
commit a3eaa98ea7
5 changed files with 26 additions and 2 deletions

View File

@ -557,6 +557,8 @@ spec:
required: required:
- size - size
properties: properties:
iops:
type: integer
size: size:
type: string type: string
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
@ -565,6 +567,8 @@ spec:
type: string type: string
subPath: subPath:
type: string type: string
throughput:
type: integer
status: status:
type: object type: object
additionalProperties: additionalProperties:

View File

@ -338,13 +338,13 @@ archive is supported.
the url to S3 bucket containing the WAL archive of the remote primary. the url to S3 bucket containing the WAL archive of the remote primary.
Required when the `standby` section is present. Required when the `standby` section is present.
## EBS volume resizing ## Volume properties
Those parameters are grouped under the `volume` top-level key and define the Those parameters are grouped under the `volume` top-level key and define the
properties of the persistent storage that stores Postgres data. properties of the persistent storage that stores Postgres data.
* **size** * **size**
the size of the target EBS volume. Usual Kubernetes size modifiers, i.e. `Gi` the size of the target volume. Usual Kubernetes size modifiers, i.e. `Gi`
or `Mi`, apply. Required. or `Mi`, apply. Required.
* **storageClass** * **storageClass**
@ -356,6 +356,14 @@ properties of the persistent storage that stores Postgres data.
* **subPath** * **subPath**
Subpath to use when mounting volume into Spilo container. Optional. Subpath to use when mounting volume into Spilo container. Optional.
* **iops**
When running the operator on AWS the latest generation of EBS volumes (`gp3`)
allows for configuring the number of IOPS. Maximum is 16000. Optional.
* **throughput**
When running the operator on AWS the latest generation of EBS volumes (`gp3`)
allows for configuring the throughput in MB/s. Maximum is 1000. Optional.
## Sidecar definitions ## Sidecar definitions
Those parameters are defined under the `sidecars` key. They consist of a list Those parameters are defined under the `sidecars` key. They consist of a list

View File

@ -44,6 +44,8 @@ spec:
volume: volume:
size: 1Gi size: 1Gi
# storageClass: my-sc # storageClass: my-sc
# iops: 1000 # for EBS gp3
# throughput: 250 # in MB/s for EBS gp3
additionalVolumes: additionalVolumes:
- name: empty - name: empty
mountPath: /opt/empty mountPath: /opt/empty

View File

@ -553,6 +553,8 @@ spec:
required: required:
- size - size
properties: properties:
iops:
type: integer
size: size:
type: string type: string
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
@ -561,6 +563,8 @@ spec:
type: string type: string
subPath: subPath:
type: string type: string
throughput:
type: integer
status: status:
type: object type: object
additionalProperties: additionalProperties:

View File

@ -835,6 +835,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
Type: "object", Type: "object",
Required: []string{"size"}, Required: []string{"size"},
Properties: map[string]apiextv1.JSONSchemaProps{ Properties: map[string]apiextv1.JSONSchemaProps{
"iops": {
Type: "integer",
},
"size": { "size": {
Type: "string", Type: "string",
Description: "Value must not be zero", Description: "Value must not be zero",
@ -846,6 +849,9 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
"subPath": { "subPath": {
Type: "string", Type: "string",
}, },
"throughput": {
Type: "integer",
},
}, },
}, },
}, },