Skip to content

Commit 45489d3

Browse files
authored
fixed markdown formatting operator_parameters.md (#2504)
* Update operator_parameters.md * Update operator_parameters.md moved the whole paragraph starting with "The CRD-based configuration is a regular YAML document..." out of the bullet list to have the same indentation you suggested here for ```bash...
1 parent 4a0c483 commit 45489d3

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

docs/reference/operator_parameters.md

+41-37
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,54 @@
33
There are two mutually-exclusive methods to set the Postgres Operator
44
configuration.
55

6-
* ConfigMaps-based, the legacy one. The configuration is supplied in a
7-
key-value configmap, defined by the `CONFIG_MAP_NAME` environment variable.
8-
Non-scalar values, i.e. lists or maps, are encoded in the value strings using
9-
the comma-based syntax for lists and coma-separated `key:value` syntax for
10-
maps. String values containing ':' should be enclosed in quotes. The
11-
configuration is flat, parameter group names below are not reflected in the
12-
configuration structure. There is an
13-
[example](https://github.com/zalando/postgres-operator/blob/master/manifests/configmap.yaml)
14-
15-
* CRD-based configuration. The configuration is stored in a custom YAML
16-
manifest. The manifest is an instance of the custom resource definition (CRD)
17-
called `OperatorConfiguration`. The operator registers this CRD during the
18-
start and uses it for configuration if the [operator deployment manifest](https://github.com/zalando/postgres-operator/blob/master/manifests/postgres-operator.yaml#L36)
19-
sets the `POSTGRES_OPERATOR_CONFIGURATION_OBJECT` env variable to a non-empty
20-
value. The variable should point to the `postgresql-operator-configuration`
21-
object in the operator's namespace.
22-
23-
The CRD-based configuration is a regular YAML document; non-scalar keys are
24-
simply represented in the usual YAML way. There are no default values built-in
25-
in the operator, each parameter that is not supplied in the configuration
26-
receives an empty value. In order to create your own configuration just copy
27-
the [default one](https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml)
28-
and change it.
29-
30-
To test the CRD-based configuration locally, use the following
31-
32-
```bash
6+
* ConfigMaps-based, the legacy one
7+
* CRD-based configuration
8+
9+
Variable names are underscore-separated words.
10+
11+
### ConfigMaps-based
12+
The configuration is supplied in a
13+
key-value configmap, defined by the `CONFIG_MAP_NAME` environment variable.
14+
Non-scalar values, i.e. lists or maps, are encoded in the value strings using
15+
the comma-based syntax for lists and coma-separated `key:value` syntax for
16+
maps. String values containing ':' should be enclosed in quotes. The
17+
configuration is flat, parameter group names below are not reflected in the
18+
configuration structure. There is an
19+
[example](https://github.com/zalando/postgres-operator/blob/master/manifests/configmap.yaml)
20+
21+
For the configmap configuration, the [default parameter values](https://github.com/zalando/postgres-operator/blob/master/pkg/util/config/config.go#L14)
22+
mentioned here are likely to be overwritten in your local operator installation
23+
via your local version of the operator configmap. In the case you use the
24+
operator CRD, all the CRD defaults are provided in the
25+
[operator's default configuration manifest](https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml)
26+
27+
### CRD-based configuration
28+
The configuration is stored in a custom YAML
29+
manifest. The manifest is an instance of the custom resource definition (CRD)
30+
called `OperatorConfiguration`. The operator registers this CRD during the
31+
start and uses it for configuration if the [operator deployment manifest](https://github.com/zalando/postgres-operator/blob/master/manifests/postgres-operator.yaml#L36)
32+
sets the `POSTGRES_OPERATOR_CONFIGURATION_OBJECT` env variable to a non-empty
33+
value. The variable should point to the `postgresql-operator-configuration`
34+
object in the operator's namespace.
35+
36+
The CRD-based configuration is a regular YAML document; non-scalar keys are
37+
simply represented in the usual YAML way. There are no default values built-in
38+
in the operator, each parameter that is not supplied in the configuration
39+
receives an empty value. In order to create your own configuration just copy
40+
the [default one](https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml)
41+
and change it.
42+
43+
To test the CRD-based configuration locally, use the following
44+
45+
```bash
3346
kubectl create -f manifests/operatorconfiguration.crd.yaml # registers the CRD
3447
kubectl create -f manifests/postgresql-operator-default-configuration.yaml
3548

3649
kubectl create -f manifests/operator-service-account-rbac.yaml
3750
kubectl create -f manifests/postgres-operator.yaml # set the env var as mentioned above
3851

3952
kubectl get operatorconfigurations postgresql-operator-default-configuration -o yaml
40-
```
53+
```
4154

4255
The CRD-based configuration is more powerful than the one based on ConfigMaps
4356
and should be used unless there is a compatibility requirement to use an already
@@ -58,15 +71,6 @@ parameters, those parameters have no effect and are replaced by the
5871
`CRD_READY_WAIT_INTERVAL` and `CRD_READY_WAIT_TIMEOUT` environment variables.
5972
They will be deprecated and removed in the future.
6073

61-
For the configmap configuration, the [default parameter values](https://github.com/zalando/postgres-operator/blob/master/pkg/util/config/config.go#L14)
62-
mentioned here are likely to be overwritten in your local operator installation
63-
via your local version of the operator configmap. In the case you use the
64-
operator CRD, all the CRD defaults are provided in the
65-
[operator's default configuration manifest](https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml)
66-
67-
Variable names are underscore-separated words.
68-
69-
7074
## General
7175

7276
Those are top-level keys, containing both leaf keys and groups.

0 commit comments

Comments
 (0)