rename failsafe_mode option in opconfig CRD (#2298)

This commit is contained in:
Felix Kunde 2023-04-20 14:28:24 +02:00 committed by GitHub
parent 3f4e44de82
commit 611e48c51e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 30 additions and 11 deletions

View File

@ -670,7 +670,7 @@ spec:
patroni:
type: object
properties:
failsafe_mode:
enable_patroni_failsafe_mode:
type: boolean
default: false
status:

View File

@ -26,4 +26,5 @@ data:
{{- include "flattenValuesForConfigMap" .Values.configLoggingRestApi | indent 2 }}
{{- include "flattenValuesForConfigMap" .Values.configTeamsApi | indent 2 }}
{{- include "flattenValuesForConfigMap" .Values.configConnectionPooler | indent 2 }}
{{- include "flattenValuesForConfigMap" .Values.configPatroni | indent 2 }}
{{- end }}

View File

@ -40,4 +40,6 @@ configuration:
{{ toYaml .Values.configLoggingRestApi | indent 4 }}
connection_pooler:
{{ toYaml .Values.configConnectionPooler | indent 4 }}
patroni:
{{ toYaml .Values.configPatroni | indent 4 }}
{{- end }}

View File

@ -431,7 +431,7 @@ configConnectionPooler:
configPatroni:
# enable Patroni DCS failsafe_mode feature
failsafe_mode: false
enable_patroni_failsafe_mode: false
# Zalando's internal CDC stream feature
enableStreams: false

View File

@ -334,9 +334,12 @@ explanation of `ttl` and `loop_wait` parameters.
Patroni `synchronous_node_count` parameter value. Note, this option is only available for Spilo images with Patroni 2.0+. The default is set to `1`. Optional.
* **failsafe_mode**
Patroni `failsafe_mode` parameter value. If enabled, allows Patroni to cope with DCS outages and avoid leader demotion. See the Patroni documentation
[here](https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html) for more details. This feature is included since Patroni 3.0.0.
Hence, check the container image in use if this feature is included in the used Patroni version. The default is set to `false`. Optional.
Patroni `failsafe_mode` parameter value. If enabled, Patroni will cope
with DCS outages by avoiding leader demotion. See the Patroni documentation
[here](https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html) for more details.
This feature is included since Patroni 3.0.0. Hence, check the container
image in use if this feature is included in the used Patroni version. The
default is set to `false`. Optional.
## Postgres container resources

View File

@ -549,6 +549,19 @@ CRD-based configuration.
hard memory minimum what we consider to be required to properly run Postgres
clusters with Patroni on Kubernetes. The default is `250Mi`.
## Patroni options
Parameters configuring Patroni. In the CRD-based configuration they are grouped
under the `patroni` key.
* **enable_patroni_failsafe_mode**
If enabled, Patroni copes with DCS outages by avoiding leader demotion.
See the Patroni documentation [here](https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html) for more details.
This feature is included since Patroni 3.0.0. Hence, check the container image
in use if this feature is included in the used Patroni version. It can also be
enabled cluster-wise with the `failsafe_mode` flag under the `patroni` section
in the manifest. The default for the global config option is set to `false`.
## Operator timeouts
This set of parameters define various timeouts related to some operator

View File

@ -47,7 +47,7 @@ data:
enable_master_load_balancer: "false"
enable_master_pooler_load_balancer: "false"
enable_password_rotation: "false"
# enable_patroni_failsafe_mode: "false"
enable_patroni_failsafe_mode: "false"
enable_pgversion_env_var: "true"
# enable_pod_antiaffinity: "false"
# enable_pod_disruption_budget: "true"

View File

@ -668,7 +668,7 @@ spec:
patroni:
type: object
properties:
failsafe_mode:
enable_patroni_failsafe_mode:
type: boolean
default: false
status:

View File

@ -209,5 +209,5 @@ configuration:
connection_pooler_number_of_instances: 2
# connection_pooler_schema: "pooler"
# connection_pooler_user: "pooler"
# patroni:
# failsafe_mode: "false"
patroni:
enable_patroni_failsafe_mode: false

View File

@ -1483,7 +1483,7 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
"patroni": {
Type: "object",
Properties: map[string]apiextv1.JSONSchemaProps{
"failsafe_mode": {
"enable_patroni_failsafe_mode": {
Type: "boolean",
},
},

View File

@ -240,7 +240,7 @@ type OperatorLogicalBackupConfiguration struct {
// PatroniConfiguration defines configuration for Patroni
type PatroniConfiguration struct {
FailsafeMode *bool `json:"failsafe_mode,omitempty"`
FailsafeMode *bool `json:"enable_patroni_failsafe_mode,omitempty"`
}
// OperatorConfigurationData defines the operation config