add operator CRD config and generate new CRDs

This commit is contained in:
tcondeixa
2026-06-24 23:15:42 +02:00
parent 1b37874b52
commit 476453489b
9 changed files with 39 additions and 16 deletions
@@ -247,16 +247,17 @@ type LoadBalancerConfiguration struct {
type AWSGCPConfiguration struct {
WALES3Bucket string `json:"wal_s3_bucket,omitempty"`
// +kubebuilder:default=eu-central-1
AWSRegion string `json:"aws_region,omitempty"`
WALGSBucket string `json:"wal_gs_bucket,omitempty"`
GCPCredentials string `json:"gcp_credentials,omitempty"`
WALAZStorageAccount string `json:"wal_az_storage_account,omitempty"`
LogS3Bucket string `json:"log_s3_bucket,omitempty"`
KubeIAMRole string `json:"kube_iam_role,omitempty"`
AdditionalSecretMount string `json:"additional_secret_mount,omitempty"`
AdditionalSecretMountPath string `json:"additional_secret_mount_path,omitempty"`
EnableEBSGp3Migration bool `json:"enable_ebs_gp3_migration,omitempty"`
EnableEBSGp3MigrationMaxSize int64 `json:"enable_ebs_gp3_migration_max_size,omitempty"`
AWSRegion string `json:"aws_region,omitempty"`
WALGSBucket string `json:"wal_gs_bucket,omitempty"`
GCPCredentials string `json:"gcp_credentials,omitempty"`
WALAZStorageAccount string `json:"wal_az_storage_account,omitempty"`
LogS3Bucket string `json:"log_s3_bucket,omitempty"`
KubeIAMRole string `json:"kube_iam_role,omitempty"`
AdditionalSecretMount string `json:"additional_secret_mount,omitempty"`
AdditionalSecretMountPath string `json:"additional_secret_mount_path,omitempty"`
EnableEBSGp3Migration bool `json:"enable_ebs_gp3_migration,omitempty"`
EnableEBSGp3MigrationMaxSize int64 `json:"enable_ebs_gp3_migration_max_size,omitempty"`
EBSVolumeTagsFromAnnotations map[string]string `json:"ebs_volume_tags_from_annotations,omitempty"`
}
// OperatorDebugConfiguration defines options for the debug mode
@@ -64,6 +64,10 @@ spec:
aws_region:
default: eu-central-1
type: string
ebs_volume_tags_from_annotations:
additionalProperties:
type: string
type: object
enable_ebs_gp3_migration:
type: boolean
enable_ebs_gp3_migration_max_size:
@@ -37,6 +37,13 @@ import (
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSGCPConfiguration) DeepCopyInto(out *AWSGCPConfiguration) {
*out = *in
if in.EBSVolumeTagsFromAnnotations != nil {
in, out := &in.EBSVolumeTagsFromAnnotations, &out.EBSVolumeTagsFromAnnotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
@@ -470,7 +477,7 @@ func (in *OperatorConfigurationData) DeepCopyInto(out *OperatorConfigurationData
out.PostgresPodResources = in.PostgresPodResources
out.Timeouts = in.Timeouts
in.LoadBalancer.DeepCopyInto(&out.LoadBalancer)
out.AWSGCP = in.AWSGCP
in.AWSGCP.DeepCopyInto(&out.AWSGCP)
in.OperatorDebug.DeepCopyInto(&out.OperatorDebug)
in.TeamsAPI.DeepCopyInto(&out.TeamsAPI)
out.LoggingRESTAPI = in.LoggingRESTAPI
+1
View File
@@ -193,6 +193,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur
result.AdditionalSecretMountPath = fromCRD.AWSGCP.AdditionalSecretMountPath
result.EnableEBSGp3Migration = fromCRD.AWSGCP.EnableEBSGp3Migration
result.EnableEBSGp3MigrationMaxSize = util.CoalesceInt64(fromCRD.AWSGCP.EnableEBSGp3MigrationMaxSize, 1000)
result.EBSVolumeTagsFromAnnotations = fromCRD.AWSGCP.EBSVolumeTagsFromAnnotations
// logical backup config
result.LogicalBackupSchedule = util.Coalesce(fromCRD.LogicalBackup.Schedule, "30 00 * * *")