adding finalizer option in all manifests and rework its docs (#2521)
This commit is contained in:
parent
8f3139965c
commit
473a203206
|
|
@ -333,11 +333,16 @@ configuration they are grouped under the `kubernetes` key.
|
||||||
will not add the `spilo-role=master` selector to the PDB.
|
will not add the `spilo-role=master` selector to the PDB.
|
||||||
|
|
||||||
* **enable_finalizers**
|
* **enable_finalizers**
|
||||||
By default, a deletion of the Postgresql resource will trigger a cleanup of
|
By default, a deletion of the Postgresql resource will trigger an event
|
||||||
all child resources. However, if the database cluster is in a broken state
|
that leads to a cleanup of all child resources. However, if the database
|
||||||
(e.g. failed initialization) and the operator cannot fully sync it, there can
|
cluster is in a broken state (e.g. failed initialization) and the operator
|
||||||
be leftovers from a DELETE event. By enabling finalizers the Operator will
|
cannot fully sync it, there can be leftovers. By enabling finalizers the
|
||||||
ensure all managed resources are deleted prior to the Postgresql resource.
|
operator will ensure all managed resources are deleted prior to the
|
||||||
|
Postgresql resource. There is a trade-off though: The deletion is only
|
||||||
|
performed at the next cluster SYNC cycle when finding a `deletionTimestamp`
|
||||||
|
in the metadata and not immediately after issueing a delete command. The
|
||||||
|
final removal of the custom resource will add a DELETE event to the worker
|
||||||
|
queue but the child resources are already gone at this point.
|
||||||
The default is `false`.
|
The default is `false`.
|
||||||
|
|
||||||
* **enable_pod_disruption_budget**
|
* **enable_pod_disruption_budget**
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -4,7 +4,6 @@ go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/aws/aws-sdk-go v1.42.18
|
github.com/aws/aws-sdk-go v1.42.18
|
||||||
github.com/evanphx/json-patch v4.12.0+incompatible
|
|
||||||
github.com/golang/mock v1.6.0
|
github.com/golang/mock v1.6.0
|
||||||
github.com/lib/pq v1.10.4
|
github.com/lib/pq v1.10.4
|
||||||
github.com/motomux/pretty v0.0.0-20161209205251-b2aad2c9a95d
|
github.com/motomux/pretty v0.0.0-20161209205251-b2aad2c9a95d
|
||||||
|
|
@ -27,6 +26,7 @@ require (
|
||||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
||||||
|
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||||
github.com/go-logr/logr v1.2.3 // indirect
|
github.com/go-logr/logr v1.2.3 // indirect
|
||||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ data:
|
||||||
# enable_admin_role_for_users: "true"
|
# enable_admin_role_for_users: "true"
|
||||||
# enable_crd_registration: "true"
|
# enable_crd_registration: "true"
|
||||||
# enable_cross_namespace_secret: "false"
|
# enable_cross_namespace_secret: "false"
|
||||||
|
enable_finalizers: "false"
|
||||||
# enable_database_access: "true"
|
# enable_database_access: "true"
|
||||||
enable_ebs_gp3_migration: "false"
|
enable_ebs_gp3_migration: "false"
|
||||||
# enable_ebs_gp3_migration_max_size: "1000"
|
# enable_ebs_gp3_migration_max_size: "1000"
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,9 @@ spec:
|
||||||
enable_cross_namespace_secret:
|
enable_cross_namespace_secret:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
enable_finalizers:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
enable_init_containers:
|
enable_init_containers:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ configuration:
|
||||||
# - deployment-time
|
# - deployment-time
|
||||||
# - downscaler/*
|
# - downscaler/*
|
||||||
# enable_cross_namespace_secret: "false"
|
# enable_cross_namespace_secret: "false"
|
||||||
|
enable_finalizers: false
|
||||||
enable_init_containers: true
|
enable_init_containers: true
|
||||||
enable_pod_antiaffinity: false
|
enable_pod_antiaffinity: false
|
||||||
enable_pod_disruption_budget: true
|
enable_pod_disruption_budget: true
|
||||||
|
|
|
||||||
|
|
@ -1305,6 +1305,9 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
"enable_cross_namespace_secret": {
|
"enable_cross_namespace_secret": {
|
||||||
Type: "boolean",
|
Type: "boolean",
|
||||||
},
|
},
|
||||||
|
"enable_finalizers": {
|
||||||
|
Type: "boolean",
|
||||||
|
},
|
||||||
"enable_init_containers": {
|
"enable_init_containers": {
|
||||||
Type: "boolean",
|
Type: "boolean",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue