diff --git a/apis/alloydb/v1alpha1/instance_types.go b/apis/alloydb/v1alpha1/instance_types.go index 41a70666fcb..90987a76717 100644 --- a/apis/alloydb/v1alpha1/instance_types.go +++ b/apis/alloydb/v1alpha1/instance_types.go @@ -63,7 +63,7 @@ type AlloyDBInstanceSpec struct { // can ONLY be specified for ZONAL instances. If present for a REGIONAL // instance, an error will be thrown. If this is absent for a ZONAL // instance, instance is created in a random zone with available capacity. - GceZone *string `json:"gceZone,omitempty"` + GCEZone *string `json:"gceZone,omitempty"` // We recommend that you use `instanceTypeRef` instead. // The type of the instance. Possible values: [PRIMARY, READ_POOL, SECONDARY] @@ -120,7 +120,7 @@ type AlloyDBInstanceStatus struct { // The IP address for the Instance. This is the connection // endpoint for an end-user application. - IpAddress *string `json:"ipAddress,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` // The name of the instance resource. Name *string `json:"name,omitempty"` @@ -128,12 +128,12 @@ type AlloyDBInstanceStatus struct { // The outbound public IP addresses for the instance. This is available ONLY when // networkConfig.enableOutboundPublicIp is set to true. These IP addresses are used // for outbound connections. - OutboundPublicIpAddresses []string `json:"outboundPublicIpAddresses,omitempty"` + OutboundPublicIPAddresses []string `json:"outboundPublicIpAddresses,omitempty"` // The public IP addresses for the Instance. This is available // ONLY when networkConfig.enablePublicIp is set to true. This is the // connection endpoint for an end-user application. - PublicIpAddress *string `json:"publicIpAddress,omitempty"` + PublicIPAddress *string `json:"publicIpAddress,omitempty"` // Set to true if the current state of Instance does not // match the user's intended state, and the service is actively updating diff --git a/apis/alloydb/v1alpha1/types.generated.go b/apis/alloydb/v1alpha1/types.generated.go index fac1677e738..d3427afab30 100644 --- a/apis/alloydb/v1alpha1/types.generated.go +++ b/apis/alloydb/v1alpha1/types.generated.go @@ -30,7 +30,7 @@ type Instance_ClientConnectionConfig struct { RequireConnectors *bool `json:"requireConnectors,omitempty"` // Optional. SSL configuration option for this instance. - SslConfig *SslConfig `json:"sslConfig,omitempty"` + SSLConfig *SSLConfig `json:"sslConfig,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig @@ -42,11 +42,11 @@ type Instance_InstanceNetworkConfig struct { // Optional. Enabling public ip for the instance. If a user wishes // to disable this, please also clear the list of the authorized // external networks set on the same instance. - EnablePublicIp *bool `json:"enablePublicIp,omitempty"` + EnablePublicIP *bool `json:"enablePublicIp,omitempty"` // Optional. Enabling an outbound public IP address to support a database // server sending requests out into the internet. - EnableOutboundPublicIp *bool `json:"enableOutboundPublicIp,omitempty"` + EnableOutboundPublicIP *bool `json:"enableOutboundPublicIp,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork @@ -58,7 +58,7 @@ type Instance_InstanceNetworkConfig_AuthorizedNetwork struct { // +kcc:proto=google.cloud.alloydb.v1beta.Instance.MachineConfig type Instance_MachineConfig struct { // The number of CPU's in the VM instance. - CpuCount *int32 `json:"cpuCount,omitempty"` + CPUCount *int32 `json:"cpuCount,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.Node @@ -70,7 +70,7 @@ type Instance_Node struct { ID *string `json:"id,omitempty"` // The private IP address of the VM e.g. "10.57.0.34". - Ip *string `json:"ip,omitempty"` + IP *string `json:"ip,omitempty"` // Determined by state of the compute VM and postgres-service health. // Compute VM state can have values listed in @@ -135,7 +135,7 @@ type Instance_PscInstanceConfig struct { // Output only. The DNS name of the instance for PSC connectivity. // Name convention: ...alloydb-psc.goog - PscDnsName *string `json:"pscDnsName,omitempty"` + PSCDNSName *string `json:"pscDnsName,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig @@ -171,11 +171,11 @@ type Instance_UpdatePolicy struct { } // +kcc:proto=google.cloud.alloydb.v1beta.SslConfig -type SslConfig struct { +type SSLConfig struct { // Optional. SSL mode. Specifies client-server SSL/TLS connection behavior. - SslMode *string `json:"sslMode,omitempty"` + SSLMode *string `json:"sslMode,omitempty"` // Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is // supported currently, and is the default value. - CaSource *string `json:"caSource,omitempty"` + CASource *string `json:"caSource,omitempty"` } diff --git a/apis/alloydb/v1alpha1/zz_generated.deepcopy.go b/apis/alloydb/v1alpha1/zz_generated.deepcopy.go index c9fc8953f98..389d7d1c893 100644 --- a/apis/alloydb/v1alpha1/zz_generated.deepcopy.go +++ b/apis/alloydb/v1alpha1/zz_generated.deepcopy.go @@ -120,8 +120,8 @@ func (in *AlloyDBInstanceSpec) DeepCopyInto(out *AlloyDBInstanceSpec) { *out = new(string) **out = **in } - if in.GceZone != nil { - in, out := &in.GceZone, &out.GceZone + if in.GCEZone != nil { + in, out := &in.GCEZone, &out.GCEZone *out = new(string) **out = **in } @@ -185,8 +185,8 @@ func (in *AlloyDBInstanceStatus) DeepCopyInto(out *AlloyDBInstanceStatus) { *out = new(string) **out = **in } - if in.IpAddress != nil { - in, out := &in.IpAddress, &out.IpAddress + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress *out = new(string) **out = **in } @@ -195,13 +195,13 @@ func (in *AlloyDBInstanceStatus) DeepCopyInto(out *AlloyDBInstanceStatus) { *out = new(string) **out = **in } - if in.OutboundPublicIpAddresses != nil { - in, out := &in.OutboundPublicIpAddresses, &out.OutboundPublicIpAddresses + if in.OutboundPublicIPAddresses != nil { + in, out := &in.OutboundPublicIPAddresses, &out.OutboundPublicIPAddresses *out = make([]string, len(*in)) copy(*out, *in) } - if in.PublicIpAddress != nil { - in, out := &in.PublicIpAddress, &out.PublicIpAddress + if in.PublicIPAddress != nil { + in, out := &in.PublicIPAddress, &out.PublicIPAddress *out = new(string) **out = **in } @@ -315,9 +315,9 @@ func (in *Instance_ClientConnectionConfig) DeepCopyInto(out *Instance_ClientConn *out = new(bool) **out = **in } - if in.SslConfig != nil { - in, out := &in.SslConfig, &out.SslConfig - *out = new(SslConfig) + if in.SSLConfig != nil { + in, out := &in.SSLConfig, &out.SSLConfig + *out = new(SSLConfig) (*in).DeepCopyInto(*out) } } @@ -342,13 +342,13 @@ func (in *Instance_InstanceNetworkConfig) DeepCopyInto(out *Instance_InstanceNet (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.EnablePublicIp != nil { - in, out := &in.EnablePublicIp, &out.EnablePublicIp + if in.EnablePublicIP != nil { + in, out := &in.EnablePublicIP, &out.EnablePublicIP *out = new(bool) **out = **in } - if in.EnableOutboundPublicIp != nil { - in, out := &in.EnableOutboundPublicIp, &out.EnableOutboundPublicIp + if in.EnableOutboundPublicIP != nil { + in, out := &in.EnableOutboundPublicIP, &out.EnableOutboundPublicIP *out = new(bool) **out = **in } @@ -387,8 +387,8 @@ func (in *Instance_InstanceNetworkConfig_AuthorizedNetwork) DeepCopy() *Instance // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Instance_MachineConfig) DeepCopyInto(out *Instance_MachineConfig) { *out = *in - if in.CpuCount != nil { - in, out := &in.CpuCount, &out.CpuCount + if in.CPUCount != nil { + in, out := &in.CPUCount, &out.CPUCount *out = new(int32) **out = **in } @@ -417,8 +417,8 @@ func (in *Instance_Node) DeepCopyInto(out *Instance_Node) { *out = new(string) **out = **in } - if in.Ip != nil { - in, out := &in.Ip, &out.Ip + if in.IP != nil { + in, out := &in.IP, &out.IP *out = new(string) **out = **in } @@ -512,8 +512,8 @@ func (in *Instance_PscInstanceConfig) DeepCopyInto(out *Instance_PscInstanceConf *out = make([]string, len(*in)) copy(*out, *in) } - if in.PscDnsName != nil { - in, out := &in.PscDnsName, &out.PscDnsName + if in.PSCDNSName != nil { + in, out := &in.PSCDNSName, &out.PSCDNSName *out = new(string) **out = **in } @@ -605,26 +605,26 @@ func (in *Instance_UpdatePolicy) DeepCopy() *Instance_UpdatePolicy { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SslConfig) DeepCopyInto(out *SslConfig) { +func (in *SSLConfig) DeepCopyInto(out *SSLConfig) { *out = *in - if in.SslMode != nil { - in, out := &in.SslMode, &out.SslMode + if in.SSLMode != nil { + in, out := &in.SSLMode, &out.SSLMode *out = new(string) **out = **in } - if in.CaSource != nil { - in, out := &in.CaSource, &out.CaSource + if in.CASource != nil { + in, out := &in.CASource, &out.CASource *out = new(string) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SslConfig. -func (in *SslConfig) DeepCopy() *SslConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSLConfig. +func (in *SSLConfig) DeepCopy() *SSLConfig { if in == nil { return nil } - out := new(SslConfig) + out := new(SSLConfig) in.DeepCopyInto(out) return out } diff --git a/apis/alloydb/v1beta1/instance_types.go b/apis/alloydb/v1beta1/instance_types.go index 2fe8fe57ce2..769952ecded 100644 --- a/apis/alloydb/v1beta1/instance_types.go +++ b/apis/alloydb/v1beta1/instance_types.go @@ -63,7 +63,7 @@ type AlloyDBInstanceSpec struct { // can ONLY be specified for ZONAL instances. If present for a REGIONAL // instance, an error will be thrown. If this is absent for a ZONAL // instance, instance is created in a random zone with available capacity. - GceZone *string `json:"gceZone,omitempty"` + GCEZone *string `json:"gceZone,omitempty"` // We recommend that you use `instanceTypeRef` instead. // The type of the instance. Possible values: [PRIMARY, READ_POOL, SECONDARY] @@ -120,7 +120,7 @@ type AlloyDBInstanceStatus struct { // The IP address for the Instance. This is the connection // endpoint for an end-user application. - IpAddress *string `json:"ipAddress,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` // The name of the instance resource. Name *string `json:"name,omitempty"` @@ -128,12 +128,12 @@ type AlloyDBInstanceStatus struct { // The outbound public IP addresses for the instance. This is available ONLY when // networkConfig.enableOutboundPublicIp is set to true. These IP addresses are used // for outbound connections. - OutboundPublicIpAddresses []string `json:"outboundPublicIpAddresses,omitempty"` + OutboundPublicIPAddresses []string `json:"outboundPublicIpAddresses,omitempty"` // The public IP addresses for the Instance. This is available // ONLY when networkConfig.enablePublicIp is set to true. This is the // connection endpoint for an end-user application. - PublicIpAddress *string `json:"publicIpAddress,omitempty"` + PublicIPAddress *string `json:"publicIpAddress,omitempty"` // Set to true if the current state of Instance does not // match the user's intended state, and the service is actively updating diff --git a/apis/alloydb/v1beta1/types.generated.go b/apis/alloydb/v1beta1/types.generated.go index 2185dbf8091..9dc6eb2646a 100644 --- a/apis/alloydb/v1beta1/types.generated.go +++ b/apis/alloydb/v1beta1/types.generated.go @@ -30,7 +30,7 @@ type Instance_ClientConnectionConfig struct { RequireConnectors *bool `json:"requireConnectors,omitempty"` // Optional. SSL configuration option for this instance. - SslConfig *SslConfig `json:"sslConfig,omitempty"` + SSLConfig *SSLConfig `json:"sslConfig,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig @@ -42,11 +42,11 @@ type Instance_InstanceNetworkConfig struct { // Optional. Enabling public ip for the instance. If a user wishes // to disable this, please also clear the list of the authorized // external networks set on the same instance. - EnablePublicIp *bool `json:"enablePublicIp,omitempty"` + EnablePublicIP *bool `json:"enablePublicIp,omitempty"` // Optional. Enabling an outbound public IP address to support a database // server sending requests out into the internet. - EnableOutboundPublicIp *bool `json:"enableOutboundPublicIp,omitempty"` + EnableOutboundPublicIP *bool `json:"enableOutboundPublicIp,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.InstanceNetworkConfig.AuthorizedNetwork @@ -58,7 +58,7 @@ type Instance_InstanceNetworkConfig_AuthorizedNetwork struct { // +kcc:proto=google.cloud.alloydb.v1beta.Instance.MachineConfig type Instance_MachineConfig struct { // The number of CPU's in the VM instance. - CpuCount *int32 `json:"cpuCount,omitempty"` + CPUCount *int32 `json:"cpuCount,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.Node @@ -70,7 +70,7 @@ type Instance_Node struct { ID *string `json:"id,omitempty"` // The private IP address of the VM e.g. "10.57.0.34". - Ip *string `json:"ip,omitempty"` + IP *string `json:"ip,omitempty"` // Determined by state of the compute VM and postgres-service health. // Compute VM state can have values listed in @@ -135,7 +135,7 @@ type Instance_PscInstanceConfig struct { // Output only. The DNS name of the instance for PSC connectivity. // Name convention: ...alloydb-psc.goog - PscDnsName *string `json:"pscDnsName,omitempty"` + PSCDNSName *string `json:"pscDnsName,omitempty"` } // +kcc:proto=google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig @@ -171,11 +171,11 @@ type Instance_UpdatePolicy struct { } // +kcc:proto=google.cloud.alloydb.v1beta.SslConfig -type SslConfig struct { +type SSLConfig struct { // Optional. SSL mode. Specifies client-server SSL/TLS connection behavior. - SslMode *string `json:"sslMode,omitempty"` + SSLMode *string `json:"sslMode,omitempty"` // Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is // supported currently, and is the default value. - CaSource *string `json:"caSource,omitempty"` + CASource *string `json:"caSource,omitempty"` } diff --git a/apis/alloydb/v1beta1/zz_generated.deepcopy.go b/apis/alloydb/v1beta1/zz_generated.deepcopy.go index 1f5bade33e4..f6636fbd176 100644 --- a/apis/alloydb/v1beta1/zz_generated.deepcopy.go +++ b/apis/alloydb/v1beta1/zz_generated.deepcopy.go @@ -120,8 +120,8 @@ func (in *AlloyDBInstanceSpec) DeepCopyInto(out *AlloyDBInstanceSpec) { *out = new(string) **out = **in } - if in.GceZone != nil { - in, out := &in.GceZone, &out.GceZone + if in.GCEZone != nil { + in, out := &in.GCEZone, &out.GCEZone *out = new(string) **out = **in } @@ -185,8 +185,8 @@ func (in *AlloyDBInstanceStatus) DeepCopyInto(out *AlloyDBInstanceStatus) { *out = new(string) **out = **in } - if in.IpAddress != nil { - in, out := &in.IpAddress, &out.IpAddress + if in.IPAddress != nil { + in, out := &in.IPAddress, &out.IPAddress *out = new(string) **out = **in } @@ -195,13 +195,13 @@ func (in *AlloyDBInstanceStatus) DeepCopyInto(out *AlloyDBInstanceStatus) { *out = new(string) **out = **in } - if in.OutboundPublicIpAddresses != nil { - in, out := &in.OutboundPublicIpAddresses, &out.OutboundPublicIpAddresses + if in.OutboundPublicIPAddresses != nil { + in, out := &in.OutboundPublicIPAddresses, &out.OutboundPublicIPAddresses *out = make([]string, len(*in)) copy(*out, *in) } - if in.PublicIpAddress != nil { - in, out := &in.PublicIpAddress, &out.PublicIpAddress + if in.PublicIPAddress != nil { + in, out := &in.PublicIPAddress, &out.PublicIPAddress *out = new(string) **out = **in } @@ -315,9 +315,9 @@ func (in *Instance_ClientConnectionConfig) DeepCopyInto(out *Instance_ClientConn *out = new(bool) **out = **in } - if in.SslConfig != nil { - in, out := &in.SslConfig, &out.SslConfig - *out = new(SslConfig) + if in.SSLConfig != nil { + in, out := &in.SSLConfig, &out.SSLConfig + *out = new(SSLConfig) (*in).DeepCopyInto(*out) } } @@ -342,13 +342,13 @@ func (in *Instance_InstanceNetworkConfig) DeepCopyInto(out *Instance_InstanceNet (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.EnablePublicIp != nil { - in, out := &in.EnablePublicIp, &out.EnablePublicIp + if in.EnablePublicIP != nil { + in, out := &in.EnablePublicIP, &out.EnablePublicIP *out = new(bool) **out = **in } - if in.EnableOutboundPublicIp != nil { - in, out := &in.EnableOutboundPublicIp, &out.EnableOutboundPublicIp + if in.EnableOutboundPublicIP != nil { + in, out := &in.EnableOutboundPublicIP, &out.EnableOutboundPublicIP *out = new(bool) **out = **in } @@ -387,8 +387,8 @@ func (in *Instance_InstanceNetworkConfig_AuthorizedNetwork) DeepCopy() *Instance // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Instance_MachineConfig) DeepCopyInto(out *Instance_MachineConfig) { *out = *in - if in.CpuCount != nil { - in, out := &in.CpuCount, &out.CpuCount + if in.CPUCount != nil { + in, out := &in.CPUCount, &out.CPUCount *out = new(int32) **out = **in } @@ -417,8 +417,8 @@ func (in *Instance_Node) DeepCopyInto(out *Instance_Node) { *out = new(string) **out = **in } - if in.Ip != nil { - in, out := &in.Ip, &out.Ip + if in.IP != nil { + in, out := &in.IP, &out.IP *out = new(string) **out = **in } @@ -512,8 +512,8 @@ func (in *Instance_PscInstanceConfig) DeepCopyInto(out *Instance_PscInstanceConf *out = make([]string, len(*in)) copy(*out, *in) } - if in.PscDnsName != nil { - in, out := &in.PscDnsName, &out.PscDnsName + if in.PSCDNSName != nil { + in, out := &in.PSCDNSName, &out.PSCDNSName *out = new(string) **out = **in } @@ -605,26 +605,26 @@ func (in *Instance_UpdatePolicy) DeepCopy() *Instance_UpdatePolicy { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SslConfig) DeepCopyInto(out *SslConfig) { +func (in *SSLConfig) DeepCopyInto(out *SSLConfig) { *out = *in - if in.SslMode != nil { - in, out := &in.SslMode, &out.SslMode + if in.SSLMode != nil { + in, out := &in.SSLMode, &out.SSLMode *out = new(string) **out = **in } - if in.CaSource != nil { - in, out := &in.CaSource, &out.CaSource + if in.CASource != nil { + in, out := &in.CASource, &out.CASource *out = new(string) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SslConfig. -func (in *SslConfig) DeepCopy() *SslConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSLConfig. +func (in *SSLConfig) DeepCopy() *SSLConfig { if in == nil { return nil } - out := new(SslConfig) + out := new(SSLConfig) in.DeepCopyInto(out) return out } diff --git a/pkg/controller/direct/alloydb/instance_controller.go b/pkg/controller/direct/alloydb/instance_controller.go index 61597895e88..8ed840cb8e2 100644 --- a/pkg/controller/direct/alloydb/instance_controller.go +++ b/pkg/controller/direct/alloydb/instance_controller.go @@ -127,7 +127,7 @@ var _ directbase.Adapter = &instanceAdapter{} // Find retrieves the GCP resource. // Return true means the object is found. This triggers Adapter `Update` call. -// Return true means the object is not found. This triggers Adapter `Create` call. +// Return false means the object is not found. This triggers Adapter `Create` call. // Return a non-nil error requeues the requests. func (a *instanceAdapter) Find(ctx context.Context) (bool, error) { log := klog.FromContext(ctx) @@ -290,8 +290,8 @@ func compareInstance(ctx context.Context, actual, desired *krm.AlloyDBInstanceSp log.V(2).Info("'spec.displayName' field is updated (-old +new)", cmp.Diff(actual.DisplayName, desired.DisplayName)) updatePaths = append(updatePaths, "display_name") } - if desired.GceZone != nil && !reflect.DeepEqual(actual.GceZone, desired.GceZone) { - log.V(2).Info("'spec.gceZone' field is updated (-old +new)", cmp.Diff(actual.GceZone, desired.GceZone)) + if desired.GCEZone != nil && !reflect.DeepEqual(actual.GCEZone, desired.GCEZone) { + log.V(2).Info("'spec.gceZone' field is updated (-old +new)", cmp.Diff(actual.GCEZone, desired.GCEZone)) updatePaths = append(updatePaths, "gce_zone") } if desired.InstanceType != nil && !reflect.DeepEqual(actual.InstanceType, desired.InstanceType) { @@ -300,18 +300,18 @@ func compareInstance(ctx context.Context, actual, desired *krm.AlloyDBInstanceSp } // TODO: Test machineConfig unset and empty struct if desired.MachineConfig != nil { - if desired.MachineConfig.CpuCount != nil && !reflect.DeepEqual(actual.MachineConfig.CpuCount, desired.MachineConfig.CpuCount) { - log.V(2).Info("'spec.machineConfig.cpuCount' field is updated (-old +new)", cmp.Diff(actual.MachineConfig.CpuCount, desired.MachineConfig.CpuCount)) + if desired.MachineConfig.CPUCount != nil && !reflect.DeepEqual(actual.MachineConfig.CPUCount, desired.MachineConfig.CPUCount) { + log.V(2).Info("'spec.machineConfig.cpuCount' field is updated (-old +new)", cmp.Diff(actual.MachineConfig.CPUCount, desired.MachineConfig.CPUCount)) updatePaths = append(updatePaths, "machine_config.cpu_count") } } if desired.NetworkConfig != nil { - if desired.NetworkConfig.EnablePublicIp != nil && !reflect.DeepEqual(actual.NetworkConfig.EnablePublicIp, desired.NetworkConfig.EnablePublicIp) { - log.V(2).Info("'spec.networkConfig.enablePublicIp' field is updated (-old +new)", cmp.Diff(actual.NetworkConfig.EnablePublicIp, desired.NetworkConfig.EnablePublicIp)) + if desired.NetworkConfig.EnablePublicIP != nil && !reflect.DeepEqual(actual.NetworkConfig.EnablePublicIP, desired.NetworkConfig.EnablePublicIP) { + log.V(2).Info("'spec.networkConfig.enablePublicIp' field is updated (-old +new)", cmp.Diff(actual.NetworkConfig.EnablePublicIP, desired.NetworkConfig.EnablePublicIP)) updatePaths = append(updatePaths, "network_config.enable_public_ip") } - if desired.NetworkConfig.EnableOutboundPublicIp != nil && !reflect.DeepEqual(actual.NetworkConfig.EnableOutboundPublicIp, desired.NetworkConfig.EnableOutboundPublicIp) { - log.V(2).Info("'spec.networkConfig.enableOutboundPublicIp' field is updated (-old +new)", cmp.Diff(actual.NetworkConfig.EnableOutboundPublicIp, desired.NetworkConfig.EnableOutboundPublicIp)) + if desired.NetworkConfig.EnableOutboundPublicIP != nil && !reflect.DeepEqual(actual.NetworkConfig.EnableOutboundPublicIP, desired.NetworkConfig.EnableOutboundPublicIP) { + log.V(2).Info("'spec.networkConfig.enableOutboundPublicIp' field is updated (-old +new)", cmp.Diff(actual.NetworkConfig.EnableOutboundPublicIP, desired.NetworkConfig.EnableOutboundPublicIP)) updatePaths = append(updatePaths, "network_config.enable_outbound_public_ip") } if desired.NetworkConfig.AuthorizedExternalNetworks != nil && !reflect.DeepEqual(actual.NetworkConfig.AuthorizedExternalNetworks, desired.NetworkConfig.AuthorizedExternalNetworks) { diff --git a/pkg/controller/direct/alloydb/instance_mappings.go b/pkg/controller/direct/alloydb/instance_mappings.go index fe2087c0530..511af83b63f 100644 --- a/pkg/controller/direct/alloydb/instance_mappings.go +++ b/pkg/controller/direct/alloydb/instance_mappings.go @@ -30,7 +30,7 @@ func AlloyDBInstanceSpec_FromProto(mapCtx *direct.MapContext, in *pb.Instance) * out.AvailabilityType = direct.Enum_FromProto(mapCtx, in.GetAvailabilityType()) out.DatabaseFlags = in.GetDatabaseFlags() out.DisplayName = direct.LazyPtr(in.GetDisplayName()) - out.GceZone = direct.LazyPtr(in.GetGceZone()) + out.GCEZone = direct.LazyPtr(in.GetGceZone()) out.InstanceType = direct.Enum_FromProto(mapCtx, in.GetInstanceType()) out.MachineConfig = Instance_MachineConfig_FromProto(mapCtx, in.GetMachineConfig()) out.NetworkConfig = Instance_InstanceNetworkConfig_FromProto(mapCtx, in.GetNetworkConfig()) @@ -47,7 +47,7 @@ func AlloyDBInstanceSpec_ToProto(mapCtx *direct.MapContext, in *krm.AlloyDBInsta out.AvailabilityType = direct.Enum_ToProto[pb.Instance_AvailabilityType](mapCtx, in.AvailabilityType) out.DatabaseFlags = in.DatabaseFlags out.DisplayName = direct.ValueOf(in.DisplayName) - out.GceZone = direct.ValueOf(in.GceZone) + out.GceZone = direct.ValueOf(in.GCEZone) out.InstanceType = direct.Enum_ToProto[pb.Instance_InstanceType](mapCtx, in.InstanceType) out.MachineConfig = Instance_MachineConfig_ToProto(mapCtx, in.MachineConfig) out.NetworkConfig = Instance_InstanceNetworkConfig_ToProto(mapCtx, in.NetworkConfig) @@ -61,10 +61,10 @@ func AlloyDBInstanceStatus_FromProto(mapCtx *direct.MapContext, in *pb.Instance) } out := &krm.AlloyDBInstanceStatus{} out.CreateTime = direct.StringTimestamp_FromProto(mapCtx, in.GetCreateTime()) - out.IpAddress = direct.LazyPtr(in.GetIpAddress()) + out.IPAddress = direct.LazyPtr(in.GetIpAddress()) out.Name = direct.LazyPtr(in.GetName()) - out.OutboundPublicIpAddresses = in.GetOutboundPublicIpAddresses() - out.PublicIpAddress = direct.LazyPtr(in.GetPublicIpAddress()) + out.OutboundPublicIPAddresses = in.GetOutboundPublicIpAddresses() + out.PublicIPAddress = direct.LazyPtr(in.GetPublicIpAddress()) out.Reconciling = direct.LazyPtr(in.Reconciling) out.State = direct.Enum_FromProto(mapCtx, in.GetState()) out.Uid = direct.LazyPtr(in.Uid) diff --git a/pkg/controller/direct/alloydb/mapper.generated.go b/pkg/controller/direct/alloydb/mapper.generated.go index 1aaa1efb955..9e6b6147637 100644 --- a/pkg/controller/direct/alloydb/mapper.generated.go +++ b/pkg/controller/direct/alloydb/mapper.generated.go @@ -43,7 +43,7 @@ func Instance_ClientConnectionConfig_FromProto(mapCtx *direct.MapContext, in *pb } out := &krm.Instance_ClientConnectionConfig{} out.RequireConnectors = direct.LazyPtr(in.GetRequireConnectors()) - out.SslConfig = SslConfig_FromProto(mapCtx, in.GetSslConfig()) + out.SSLConfig = SslConfig_FromProto(mapCtx, in.GetSslConfig()) return out } func Instance_ClientConnectionConfig_ToProto(mapCtx *direct.MapContext, in *krm.Instance_ClientConnectionConfig) *pb.Instance_ClientConnectionConfig { @@ -52,7 +52,7 @@ func Instance_ClientConnectionConfig_ToProto(mapCtx *direct.MapContext, in *krm. } out := &pb.Instance_ClientConnectionConfig{} out.RequireConnectors = direct.ValueOf(in.RequireConnectors) - out.SslConfig = SslConfig_ToProto(mapCtx, in.SslConfig) + out.SslConfig = SslConfig_ToProto(mapCtx, in.SSLConfig) return out } func Instance_InstanceNetworkConfig_FromProto(mapCtx *direct.MapContext, in *pb.Instance_InstanceNetworkConfig) *krm.Instance_InstanceNetworkConfig { @@ -61,8 +61,8 @@ func Instance_InstanceNetworkConfig_FromProto(mapCtx *direct.MapContext, in *pb. } out := &krm.Instance_InstanceNetworkConfig{} out.AuthorizedExternalNetworks = direct.Slice_FromProto(mapCtx, in.AuthorizedExternalNetworks, Instance_InstanceNetworkConfig_AuthorizedNetwork_FromProto) - out.EnablePublicIp = direct.LazyPtr(in.GetEnablePublicIp()) - out.EnableOutboundPublicIp = direct.LazyPtr(in.GetEnableOutboundPublicIp()) + out.EnablePublicIP = direct.LazyPtr(in.GetEnablePublicIp()) + out.EnableOutboundPublicIP = direct.LazyPtr(in.GetEnableOutboundPublicIp()) return out } func Instance_InstanceNetworkConfig_ToProto(mapCtx *direct.MapContext, in *krm.Instance_InstanceNetworkConfig) *pb.Instance_InstanceNetworkConfig { @@ -71,8 +71,8 @@ func Instance_InstanceNetworkConfig_ToProto(mapCtx *direct.MapContext, in *krm.I } out := &pb.Instance_InstanceNetworkConfig{} out.AuthorizedExternalNetworks = direct.Slice_ToProto(mapCtx, in.AuthorizedExternalNetworks, Instance_InstanceNetworkConfig_AuthorizedNetwork_ToProto) - out.EnablePublicIp = direct.ValueOf(in.EnablePublicIp) - out.EnableOutboundPublicIp = direct.ValueOf(in.EnableOutboundPublicIp) + out.EnablePublicIp = direct.ValueOf(in.EnablePublicIP) + out.EnableOutboundPublicIp = direct.ValueOf(in.EnableOutboundPublicIP) return out } func Instance_InstanceNetworkConfig_AuthorizedNetwork_FromProto(mapCtx *direct.MapContext, in *pb.Instance_InstanceNetworkConfig_AuthorizedNetwork) *krm.Instance_InstanceNetworkConfig_AuthorizedNetwork { @@ -96,7 +96,7 @@ func Instance_MachineConfig_FromProto(mapCtx *direct.MapContext, in *pb.Instance return nil } out := &krm.Instance_MachineConfig{} - out.CpuCount = direct.LazyPtr(in.GetCpuCount()) + out.CPUCount = direct.LazyPtr(in.GetCpuCount()) return out } func Instance_MachineConfig_ToProto(mapCtx *direct.MapContext, in *krm.Instance_MachineConfig) *pb.Instance_MachineConfig { @@ -104,7 +104,7 @@ func Instance_MachineConfig_ToProto(mapCtx *direct.MapContext, in *krm.Instance_ return nil } out := &pb.Instance_MachineConfig{} - out.CpuCount = direct.ValueOf(in.CpuCount) + out.CpuCount = direct.ValueOf(in.CPUCount) return out } func Instance_Node_FromProto(mapCtx *direct.MapContext, in *pb.Instance_Node) *krm.Instance_Node { @@ -114,7 +114,7 @@ func Instance_Node_FromProto(mapCtx *direct.MapContext, in *pb.Instance_Node) *k out := &krm.Instance_Node{} out.ZoneID = direct.LazyPtr(in.GetZoneId()) out.ID = direct.LazyPtr(in.GetId()) - out.Ip = direct.LazyPtr(in.GetIp()) + out.IP = direct.LazyPtr(in.GetIp()) out.State = direct.LazyPtr(in.GetState()) return out } @@ -125,7 +125,7 @@ func Instance_Node_ToProto(mapCtx *direct.MapContext, in *krm.Instance_Node) *pb out := &pb.Instance_Node{} out.ZoneId = direct.ValueOf(in.ZoneID) out.Id = direct.ValueOf(in.ID) - out.Ip = direct.ValueOf(in.Ip) + out.Ip = direct.ValueOf(in.IP) out.State = direct.ValueOf(in.State) return out } @@ -168,7 +168,7 @@ func Instance_PscInstanceConfig_FromProto(mapCtx *direct.MapContext, in *pb.Inst out := &krm.Instance_PscInstanceConfig{} out.ServiceAttachmentLink = direct.LazyPtr(in.GetServiceAttachmentLink()) out.AllowedConsumerProjects = in.AllowedConsumerProjects - out.PscDnsName = direct.LazyPtr(in.GetPscDnsName()) + out.PSCDNSName = direct.LazyPtr(in.GetPscDnsName()) return out } func Instance_PscInstanceConfig_ToProto(mapCtx *direct.MapContext, in *krm.Instance_PscInstanceConfig) *pb.Instance_PscInstanceConfig { @@ -178,7 +178,7 @@ func Instance_PscInstanceConfig_ToProto(mapCtx *direct.MapContext, in *krm.Insta out := &pb.Instance_PscInstanceConfig{} out.ServiceAttachmentLink = direct.ValueOf(in.ServiceAttachmentLink) out.AllowedConsumerProjects = in.AllowedConsumerProjects - out.PscDnsName = direct.ValueOf(in.PscDnsName) + out.PscDnsName = direct.ValueOf(in.PSCDNSName) return out } func Instance_QueryInsightsInstanceConfig_FromProto(mapCtx *direct.MapContext, in *pb.Instance_QueryInsightsInstanceConfig) *krm.Instance_QueryInsightsInstanceConfig { @@ -235,21 +235,21 @@ func Instance_UpdatePolicy_ToProto(mapCtx *direct.MapContext, in *krm.Instance_U out.Mode = direct.Enum_ToProto[pb.Instance_UpdatePolicy_Mode](mapCtx, in.Mode) return out } -func SslConfig_FromProto(mapCtx *direct.MapContext, in *pb.SslConfig) *krm.SslConfig { +func SslConfig_FromProto(mapCtx *direct.MapContext, in *pb.SslConfig) *krm.SSLConfig { if in == nil { return nil } - out := &krm.SslConfig{} - out.SslMode = direct.Enum_FromProto(mapCtx, in.GetSslMode()) - out.CaSource = direct.Enum_FromProto(mapCtx, in.GetCaSource()) + out := &krm.SSLConfig{} + out.SSLMode = direct.Enum_FromProto(mapCtx, in.GetSslMode()) + out.CASource = direct.Enum_FromProto(mapCtx, in.GetCaSource()) return out } -func SslConfig_ToProto(mapCtx *direct.MapContext, in *krm.SslConfig) *pb.SslConfig { +func SslConfig_ToProto(mapCtx *direct.MapContext, in *krm.SSLConfig) *pb.SslConfig { if in == nil { return nil } out := &pb.SslConfig{} - out.SslMode = direct.Enum_ToProto[pb.SslConfig_SslMode](mapCtx, in.SslMode) - out.CaSource = direct.Enum_ToProto[pb.SslConfig_CaSource](mapCtx, in.CaSource) + out.SslMode = direct.Enum_ToProto[pb.SslConfig_SslMode](mapCtx, in.SSLMode) + out.CaSource = direct.Enum_ToProto[pb.SslConfig_CaSource](mapCtx, in.CASource) return out }