diff --git a/pkg/controller/direct/sql/sqlinstance_controller.go b/pkg/controller/direct/sql/sqlinstance_controller.go index b372efc905..ecfca0bb94 100644 --- a/pkg/controller/direct/sql/sqlinstance_controller.go +++ b/pkg/controller/direct/sql/sqlinstance_controller.go @@ -212,7 +212,7 @@ func (a *sqlInstanceAdapter) cloneInstance(ctx context.Context, u *unstructured. } func (a *sqlInstanceAdapter) insertInstance(ctx context.Context, u *unstructured.Unstructured, log klog.Logger) error { - desiredGCP, err := SQLInstanceKRMToGCP(a.desired) + desiredGCP, err := SQLInstanceKRMToGCP(a.desired, a.actual) if err != nil { return err } @@ -381,7 +381,7 @@ func (a *sqlInstanceAdapter) Update(ctx context.Context, updateOp *directbase.Up } // Finally, update rest of the fields - desiredGCP, err := SQLInstanceKRMToGCP(a.desired) + desiredGCP, err := SQLInstanceKRMToGCP(a.desired, a.actual) if err != nil { return err } @@ -389,9 +389,6 @@ func (a *sqlInstanceAdapter) Update(ctx context.Context, updateOp *directbase.Up if !InstancesMatch(desiredGCP, a.actual) { updateOp.RecordUpdatingEvent() - // GCP API requires we set the current settings version, otherwise update will fail. - desiredGCP.Settings.SettingsVersion = a.actual.Settings.SettingsVersion - op, err := a.sqlInstancesClient.Update(a.projectID, desiredGCP.Name, desiredGCP).Context(ctx).Do() if err != nil { return fmt.Errorf("updating SQLInstance %s failed: %w", desiredGCP.Name, err) diff --git a/pkg/controller/direct/sql/sqlinstance_defaults.go b/pkg/controller/direct/sql/sqlinstance_defaults.go index 4c11357c79..af6ce130c0 100644 --- a/pkg/controller/direct/sql/sqlinstance_defaults.go +++ b/pkg/controller/direct/sql/sqlinstance_defaults.go @@ -20,29 +20,70 @@ import ( api "google.golang.org/api/sqladmin/v1beta4" ) -func ApplySQLInstanceGCPDefaults(in *krm.SQLInstance, out *api.DatabaseInstance) { +func ApplySQLInstanceGCPDefaults(in *krm.SQLInstance, out *api.DatabaseInstance, actual *api.DatabaseInstance) { if in.Spec.InstanceType == nil { + // GCP default InstanceType is CLOUD_SQL_INSTANCE. out.InstanceType = "CLOUD_SQL_INSTANCE" } + if in.Spec.MaintenanceVersion == nil && actual != nil { + // If desired maintenanceVersion is not specified, assume user wants the actual. + out.MaintenanceVersion = actual.MaintenanceVersion + } if in.Spec.Settings.ActivationPolicy == nil { + // GCP default ActivationPolicy is ALWAYS. out.Settings.ActivationPolicy = "ALWAYS" } + if in.Spec.Settings.AuthorizedGaeApplications == nil { + // For some reason, GCP API uses empty slice instead of nil. + out.Settings.AuthorizedGaeApplications = make([]string, 0) + } if in.Spec.Settings.AvailabilityType == nil { + // GCP default AvailailbilityType is ZONAL. out.Settings.AvailabilityType = "ZONAL" } + if in.Spec.Settings.BackupConfiguration == nil && actual != nil && !actual.Settings.BackupConfiguration.Enabled { + // If desired backupConfiguration is not specified and actual is disabled, use the actual. + out.Settings.BackupConfiguration = actual.Settings.BackupConfiguration + } if in.Spec.Settings.ConnectorEnforcement == nil { + // GCP default ConnectorEnforcement is NOT_REQUIRED. out.Settings.ConnectorEnforcement = "NOT_REQUIRED" } if in.Spec.Settings.DiskType == nil { + // GCP default DiskType is PD_SSD. out.Settings.DataDiskType = "PD_SSD" } if in.Spec.Settings.Edition == nil { + // GCP default Edition is ENTERPRISE. out.Settings.Edition = "ENTERPRISE" } + if in.Spec.Settings.IpConfiguration == nil { + // GCP default IpConfiguration. + out.Settings.IpConfiguration = &api.IpConfiguration{ + Ipv4Enabled: true, + ServerCaMode: "GOOGLE_MANAGED_INTERNAL_CA", + SslMode: "ALLOW_UNENCRYPTED_AND_ENCRYPTED", + } + } if in.Spec.Settings.PricingPlan == nil { + // GCP default PricingPlan is PER_USE. out.Settings.PricingPlan = "PER_USE" } + if in.Spec.Settings.ReplicationType == nil { + // GCP default ReplicationType is SYNCHRONOUS. + out.Settings.ReplicationType = "SYNCHRONOUS" + } if in.Spec.Settings.DiskAutoresize == nil { + // GCP default StorageAutoResize is true. out.Settings.StorageAutoResize = direct.PtrTo(true) } + if in.Spec.Settings.DiskSize == nil && actual != nil && *out.Settings.StorageAutoResize { + // If desired DiskSize is not specified and StorageAutoResize is enabled, use the actual disk size. + // Note: This must be set AFTER setting the default value for StorageAutoResize. + out.Settings.DataDiskSizeGb = actual.Settings.DataDiskSizeGb + } + if actual != nil { + // GCP API requires we set the current settings version, otherwise update will fail. + out.Settings.SettingsVersion = actual.Settings.SettingsVersion + } } diff --git a/pkg/controller/direct/sql/sqlinstance_equality.go b/pkg/controller/direct/sql/sqlinstance_equality.go index 22345d2b6a..e9370c371b 100644 --- a/pkg/controller/direct/sql/sqlinstance_equality.go +++ b/pkg/controller/direct/sql/sqlinstance_equality.go @@ -183,11 +183,13 @@ func SettingsMatch(desired *api.Settings, actual *api.Settings) bool { if desired.ReplicationType != actual.ReplicationType { return false } - // Ignore SettingsVersion. It is not part of the "desired state". + if desired.SettingsVersion != actual.SettingsVersion { + return false + } if !SqlServerAuditConfigsMatch(desired.SqlServerAuditConfig, actual.SqlServerAuditConfig) { return false } - if desired.StorageAutoResize != actual.StorageAutoResize { + if !StorageAutoResizesMatch(desired.StorageAutoResize, actual.StorageAutoResize) { return false } if desired.StorageAutoResizeLimit != actual.StorageAutoResizeLimit { @@ -624,6 +626,19 @@ func SqlServerAuditConfigsMatch(desired *api.SqlServerAuditConfig, actual *api.S return true } +func StorageAutoResizesMatch(desired *bool, actual *bool) bool { + if desired == nil && actual == nil { + return true + } + if !PointersMatch(desired, actual) { + return false + } + if *desired != *actual { + return false + } + return true +} + func PointersMatch[T any](desired *T, actual *T) bool { if (desired == nil && actual != nil) || (desired != nil && actual == nil) { // Pointers are not matching if one is nil and the other is not nil. diff --git a/pkg/controller/direct/sql/sqlinstance_mappings.go b/pkg/controller/direct/sql/sqlinstance_mappings.go index e20b19ac47..e6c829dbc4 100644 --- a/pkg/controller/direct/sql/sqlinstance_mappings.go +++ b/pkg/controller/direct/sql/sqlinstance_mappings.go @@ -26,7 +26,7 @@ import ( "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/label" ) -func SQLInstanceKRMToGCP(in *krm.SQLInstance) (*api.DatabaseInstance, error) { +func SQLInstanceKRMToGCP(in *krm.SQLInstance, actual *api.DatabaseInstance) (*api.DatabaseInstance, error) { if in == nil { return nil, fmt.Errorf("cannot convert nil KRM SQLInstance to GCP DatabaseInstance") } @@ -52,7 +52,7 @@ func SQLInstanceKRMToGCP(in *krm.SQLInstance) (*api.DatabaseInstance, error) { } // Here be dragons. - ApplySQLInstanceGCPDefaults(in, out) + ApplySQLInstanceGCPDefaults(in, out, actual) return out, nil } diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-activationpolicy-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-activationpolicy-direct/_http.log index 001cc56e71..e724d1a3a5 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-activationpolicy-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-activationpolicy-direct/_http.log @@ -44,12 +44,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -378,20 +384,38 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-activationpolicy-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "NEVER", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -527,6 +551,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-auditconfig-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-auditconfig-direct/_http.log index 8592c48a77..ef3edadd20 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-auditconfig-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-auditconfig-direct/_http.log @@ -184,12 +184,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "sqlServerAuditConfig": { "bucket": "gs://storagebucket-${uniqueId}", "kind": "sql#sqlServerAuditConfig", @@ -561,21 +567,39 @@ User-Agent: kcc/controller-manager "databaseVersion": "SQLSERVER_2022_EXPRESS", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "SQLSERVER_2022_EXPRESS_CU12_GDR.R20240501.00_05", "name": "sqlinstance-auditconfig-direct-${uniqueId}", "region": "us-central1", "rootPassword": "1234!@#$asdf", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "sqlServerAuditConfig": { "bucket": "gs://storagebucket-${uniqueId}", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-authorizednetworks-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-authorizednetworks-direct/_http.log index d67cd55770..ee41fc2838 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-authorizednetworks-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-authorizednetworks-direct/_http.log @@ -60,6 +60,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -374,12 +375,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-authorizednetworks-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", "ipConfiguration": { @@ -404,6 +417,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -539,6 +553,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-binarylog-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-binarylog-direct/_http.log index 6bcabbeeaf..3deec3d9ab 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-binarylog-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-binarylog-direct/_http.log @@ -57,12 +57,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -573,6 +579,7 @@ User-Agent: kcc/controller-manager "databaseVersion": "MYSQL_5_7", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", "name": "sqlinstance-backupconfiguration-binarylog-direct-${uniqueId}", "region": "us-central1", "settings": { @@ -592,14 +599,21 @@ User-Agent: kcc/controller-manager "transactionLogRetentionDays": 3 }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-pitr-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-pitr-direct/_http.log index a17c89bb47..379176aa17 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-pitr-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-backupconfiguration-pitr-direct/_http.log @@ -57,12 +57,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -397,6 +403,7 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-backupconfiguration-pitr-direct-${uniqueId}", "region": "us-central1", "settings": { @@ -416,14 +423,21 @@ User-Agent: kcc/controller-manager "transactionLogRetentionDays": 3 }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-clone-minimal-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-clone-minimal-direct/_http.log index 492d6a1e46..bf88324e05 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-clone-minimal-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-clone-minimal-direct/_http.log @@ -49,12 +49,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-connectorenforcement-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-connectorenforcement-direct/_http.log index 5aa092356f..ac7680b782 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-connectorenforcement-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-connectorenforcement-direct/_http.log @@ -44,12 +44,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -378,20 +384,38 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-connectorenforcement-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -527,6 +551,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-databaseflags-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-databaseflags-direct/_http.log index 537aefde72..2be80f1e76 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-databaseflags-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-databaseflags-direct/_http.log @@ -50,12 +50,18 @@ User-Agent: kcc/controller-manager } ], "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -396,12 +402,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-databaseflags-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "databaseFlags": [ { @@ -414,12 +432,18 @@ User-Agent: kcc/controller-manager } ], "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -555,6 +579,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig-direct/_http.log index bccea40725..33050ec6cd 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-datacacheconfig-direct/_http.log @@ -47,12 +47,18 @@ User-Agent: kcc/controller-manager }, "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -564,23 +570,41 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-datacacheconfig-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", "dataCacheConfig": { "dataCacheEnabled": true }, + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE_PLUS", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-perf-optimized-N-2", @@ -716,6 +740,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-deletionprotection-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-deletionprotection-direct/_http.log index 45d2e7effe..6af5fb4389 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-deletionprotection-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-deletionprotection-direct/_http.log @@ -45,12 +45,18 @@ User-Agent: kcc/controller-manager "dataDiskType": "PD_SSD", "deletionProtectionEnabled": true, "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -379,21 +385,39 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-deletionprotection-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "deletionProtectionEnabled": false, "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -529,6 +553,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-denymaintenanceperiod-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-denymaintenanceperiod-direct/_http.log index 8f37e61c5b..bec3fee14f 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-denymaintenanceperiod-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-denymaintenanceperiod-direct/_http.log @@ -51,12 +51,18 @@ User-Agent: kcc/controller-manager } ], "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -399,12 +405,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-denymaintenanceperiod-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "denyMaintenancePeriods": [ { @@ -414,12 +432,18 @@ User-Agent: kcc/controller-manager } ], "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -555,6 +579,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-encryptionkey-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-encryptionkey-direct/_http.log index 5836896a5c..1fcac639eb 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-encryptionkey-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-encryptionkey-direct/_http.log @@ -1088,6 +1088,7 @@ User-Agent: kcc/controller-manager "updateTrack": "stable" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-8-30720", "userLabels": { @@ -1467,6 +1468,7 @@ User-Agent: kcc/controller-manager }, "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-encryptionkey-direct-${uniqueId}", "region": "us-central1", "settings": { @@ -1517,6 +1519,7 @@ User-Agent: kcc/controller-manager "updateTrack": "stable" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-8-30720", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-insightsconfig-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-insightsconfig-direct/_http.log index 7aeea7fc1f..b828b72ca7 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-insightsconfig-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-insightsconfig-direct/_http.log @@ -51,12 +51,18 @@ User-Agent: kcc/controller-manager "recordApplicationTags": false, "recordClientAddress": false }, + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -393,12 +399,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-insightsconfig-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", "insightsConfig": { @@ -408,12 +426,18 @@ User-Agent: kcc/controller-manager "recordApplicationTags": true, "recordClientAddress": true }, + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -549,6 +573,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-locationpreference-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-locationpreference-direct/_http.log index 08c5010da6..77dc5b0e25 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-locationpreference-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-locationpreference-direct/_http.log @@ -44,12 +44,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -364,14 +370,31 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-locationpreference-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "REGIONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", @@ -379,6 +402,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-b" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -514,6 +538,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-maintenancewindow-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-maintenancewindow-direct/_http.log index 17ae778e9e..53496af6d9 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-maintenancewindow-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-maintenancewindow-direct/_http.log @@ -44,6 +44,11 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", @@ -56,6 +61,7 @@ User-Agent: kcc/controller-manager "updateTrack": "canary" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -396,14 +402,31 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-maintenancewindow-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", @@ -416,6 +439,7 @@ User-Agent: kcc/controller-manager "updateTrack": "stable" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -551,6 +575,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-multithreading-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-multithreading-direct/_http.log index 065b87f269..db221b9f96 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-multithreading-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-multithreading-direct/_http.log @@ -48,12 +48,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-6-16384", "userLabels": { @@ -453,6 +459,7 @@ User-Agent: kcc/controller-manager "databaseVersion": "SQLSERVER_2019_EXPRESS", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "SQLSERVER_2019_EXPRESS_CU26.R20240501.00_05", "name": "sqlinstance-multithreading-direct-${uniqueId}", "region": "us-central1", "rootPassword": "1234!@#$asdf", @@ -462,15 +469,32 @@ User-Agent: kcc/controller-manager "threadsPerCore": 2 }, "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-6-16384", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-direct/_http.log index 4a0fa7e7d8..0b8c0d3930 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-direct/_http.log @@ -45,8 +45,14 @@ User-Agent: kcc/controller-manager "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": false, "tier": "db-n1-standard-1", "userLabels": { @@ -556,17 +562,34 @@ User-Agent: kcc/controller-manager "databaseVersion": "MYSQL_5_7", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "MYSQL_5_7_44.R20231105.01_03", "name": "sqlinstance-mysql-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", "dataDiskSizeGb": "20", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": false, "tier": "db-n1-standard-1", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-minimal-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-minimal-direct/_http.log index 2bf63401e0..4150f4d232 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-minimal-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-mysql-minimal-direct/_http.log @@ -44,12 +44,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -782,20 +788,38 @@ User-Agent: kcc/controller-manager "databaseVersion": "MYSQL_8_0", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "MYSQL_8_0_31.R20240527.01_00", "name": "sqlinstance-mysql-minimal-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-2-7680", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-passwordvalidationpolicy-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-passwordvalidationpolicy-direct/_http.log index cc1ccad95e..4da4e7cf52 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-passwordvalidationpolicy-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-passwordvalidationpolicy-direct/_http.log @@ -44,6 +44,11 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", @@ -53,6 +58,7 @@ User-Agent: kcc/controller-manager "enablePasswordPolicy": false }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -387,14 +393,31 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-passwordvalidationpolicy-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", @@ -409,6 +432,7 @@ User-Agent: kcc/controller-manager "reuseInterval": 2 }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -544,6 +568,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-direct/_http.log index 6042c39177..83fb44626f 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-direct/_http.log @@ -601,6 +601,7 @@ User-Agent: kcc/controller-manager }, "kind": "sql#settings", "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": false, "storageAutoResizeLimit": "0", "tier": "db-custom-1-3840", @@ -1001,6 +1002,7 @@ User-Agent: kcc/controller-manager }, "kind": "sql#settings", "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": false, "storageAutoResizeLimit": "0", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-minimal-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-minimal-direct/_http.log index a462dcc436..596285707b 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-minimal-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-postgres-minimal-direct/_http.log @@ -44,12 +44,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -548,20 +554,38 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-postgres-minimal-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-2-7680", @@ -697,6 +721,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-direct/_http.log index c8633f6541..1e63312907 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-direct/_http.log @@ -1392,6 +1392,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -1704,12 +1705,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-privatenetwork-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", "ipConfiguration": { @@ -1724,6 +1737,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -1855,6 +1869,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-legacyref-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-legacyref-direct/_http.log index 6f9627af10..53108e4dbf 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-legacyref-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-privatenetwork-legacyref-direct/_http.log @@ -1392,6 +1392,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -1704,12 +1705,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-privatenetwork-legacyref-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", "ipConfiguration": { @@ -1724,6 +1737,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -1855,6 +1869,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-replica-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-replica-direct/_http.log index cbb063bccc..b1716026fd 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-replica-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-replica-direct/_http.log @@ -49,12 +49,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -434,12 +440,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-b" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-direct/_http.log index e940241d38..acb6bb57b0 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-direct/_http.log @@ -46,12 +46,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "timeZone": "Mountain Standard Time", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-minimal-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-minimal-direct/_http.log index 3489a6046d..48802b232e 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-minimal-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-sqlserver-minimal-direct/_http.log @@ -45,12 +45,18 @@ User-Agent: kcc/controller-manager "connectorEnforcement": "NOT_REQUIRED", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -620,21 +626,39 @@ User-Agent: kcc/controller-manager "databaseVersion": "SQLSERVER_2022_EXPRESS", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "SQLSERVER_2022_EXPRESS_CU12_GDR.R20240501.00_05", "name": "sqlinstance-sqlserver-minimal-direct-${uniqueId}", "region": "us-central1", "rootPassword": "1234!@#$asdf", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-2-7680", diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-ssl-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-ssl-direct/_http.log index e63873e474..86b06c02c8 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-ssl-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-ssl-direct/_http.log @@ -53,6 +53,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": true, "tier": "db-custom-1-3840", "userLabels": { @@ -367,12 +368,24 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_16", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_16_3.R20240527.01_10", "name": "sqlinstance-ssl-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", + "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", "ipConfiguration": { @@ -385,6 +398,7 @@ User-Agent: kcc/controller-manager "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "tier": "db-custom-1-3840", @@ -520,6 +534,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" diff --git a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-storage-direct/_http.log b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-storage-direct/_http.log index 7fac3c5a4a..1be57fe225 100644 --- a/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-storage-direct/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/sqlinstance-storage-direct/_http.log @@ -45,12 +45,18 @@ User-Agent: kcc/controller-manager "dataDiskSizeGb": "10", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "storageAutoResize": false, "tier": "db-custom-1-3840", "userLabels": { @@ -379,21 +385,38 @@ User-Agent: kcc/controller-manager "databaseVersion": "POSTGRES_15", "instanceType": "CLOUD_SQL_INSTANCE", "kind": "sql#instance", + "maintenanceVersion": "POSTGRES_15_7.R20240514.00_12", "name": "sqlinstance-storage-direct-${uniqueId}", "region": "us-central1", "settings": { "activationPolicy": "ALWAYS", "availabilityType": "ZONAL", + "backupConfiguration": { + "backupRetentionSettings": { + "retainedBackups": 7, + "retentionUnit": "COUNT" + }, + "kind": "sql#backupConfiguration", + "startTime": "12:00", + "transactionLogRetentionDays": 7, + "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED" + }, "connectorEnforcement": "NOT_REQUIRED", "dataDiskSizeGb": "15", "dataDiskType": "PD_SSD", "edition": "ENTERPRISE", + "ipConfiguration": { + "ipv4Enabled": true, + "serverCaMode": "GOOGLE_MANAGED_INTERNAL_CA", + "sslMode": "ALLOW_UNENCRYPTED_AND_ENCRYPTED" + }, "kind": "sql#settings", "locationPreference": { "kind": "sql#locationPreference", "zone": "us-central1-a" }, "pricingPlan": "PER_USE", + "replicationType": "SYNCHRONOUS", "settingsVersion": "123", "storageAutoResize": true, "storageAutoResizeLimit": "100", @@ -530,6 +553,7 @@ X-Xss-Protection: 0 }, "enabled": false, "kind": "sql#backupConfiguration", + "replicationLogArchivingEnabled": false, "startTime": "12:00", "transactionLogRetentionDays": 7, "transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED"