mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 06:55:21 +02:00
Add configuration flag for disabling operator CRD creation/update (#1733)
* Make CRD registration configurable and drop RBAC permissions when CRD registration is disabled * add generated deep copy functions Co-authored-by: Damian Peckett <d.peckett_admin@mgmt.innovo-cloud.de>
This commit is contained in:
co-authored by
Damian Peckett
parent
b4155bc8fb
commit
fe340192ca
@@ -946,6 +946,9 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||
"docker_image": {
|
||||
Type: "string",
|
||||
},
|
||||
"enable_crd_registration": {
|
||||
Type: "boolean",
|
||||
},
|
||||
"enable_crd_validation": {
|
||||
Type: "boolean",
|
||||
},
|
||||
|
||||
@@ -215,6 +215,7 @@ type OperatorLogicalBackupConfiguration struct {
|
||||
|
||||
// OperatorConfigurationData defines the operation config
|
||||
type OperatorConfigurationData struct {
|
||||
EnableCRDRegistration *bool `json:"enable_crd_registration,omitempty"`
|
||||
EnableCRDValidation *bool `json:"enable_crd_validation,omitempty"`
|
||||
EnableLazySpiloUpgrade bool `json:"enable_lazy_spilo_upgrade,omitempty"`
|
||||
EnablePgVersionEnvVar bool `json:"enable_pgversion_env_var,omitempty"`
|
||||
|
||||
@@ -367,6 +367,11 @@ func (in *OperatorConfiguration) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OperatorConfigurationData) DeepCopyInto(out *OperatorConfigurationData) {
|
||||
*out = *in
|
||||
if in.EnableCRDRegistration != nil {
|
||||
in, out := &in.EnableCRDRegistration, &out.EnableCRDRegistration
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableCRDValidation != nil {
|
||||
in, out := &in.EnableCRDValidation, &out.EnableCRDValidation
|
||||
*out = new(bool)
|
||||
|
||||
Reference in New Issue
Block a user