From a0ced3d6c4419d87148bf365fc5941e436465117 Mon Sep 17 00:00:00 2001 From: Shyam Radhakrishnan Date: Tue, 6 Aug 2024 18:51:35 +0530 Subject: [PATCH] Fix webhook errors and add params to NLB (#374) * Fix the label in CRD for versions and add more parameters to NLB spec --- api/v1beta1/types.go | 42 +++++++ api/v1beta1/zz_generated.conversion.go | 110 +++++++++++++++++ api/v1beta1/zz_generated.deepcopy.go | 78 +++++++++++- api/v1beta2/types.go | 43 +++++++ api/v1beta2/zz_generated.deepcopy.go | 78 +++++++++++- cloud/scope/clients.go | 1 - .../scope/network_load_balancer_reconciler.go | 19 ++- .../network_load_balancer_reconciler_test.go | 113 +++++++++++++++++- ...tructure.cluster.x-k8s.io_ociclusters.yaml | 80 +++++++++++++ ....cluster.x-k8s.io_ociclustertemplates.yaml | 88 ++++++++++++++ ...e.cluster.x-k8s.io_ocimanagedclusters.yaml | 80 +++++++++++++ ...r.x-k8s.io_ocimanagedclustertemplates.yaml | 88 ++++++++++++++ config/crd/kustomization.yaml | 2 +- exp/api/v1beta1/zz_generated.deepcopy.go | 1 + exp/api/v1beta2/zz_generated.deepcopy.go | 1 + go.mod | 2 +- go.sum | 4 +- metadata.yaml | 3 + 18 files changed, 811 insertions(+), 22 deletions(-) diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index 89604e2d..dbae2b81 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -947,6 +947,48 @@ type LoadBalancer struct { // ID of Load Balancer. // +optional LoadBalancerId *string `json:"loadBalancerId,omitempty"` + + // The NLB Spec + // +optional + NLBSpec NLBSpec `json:"nlbSpec,omitempty"` +} + +// NLBSpec specifies the NLB spec. +type NLBSpec struct { + // BackendSetDetails specifies the configuration of a network load balancer backend set. + // +optional + BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"` +} + +// BackendSetDetails specifies the configuration of a network load balancer backend set. +type BackendSetDetails struct { + // If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends. + // Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled. + // The value is false by default. + // +optional + IsPreserveSource *bool `json:"isPreserveSource,omitempty"` + + // If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy. + // The value is false by default. + // +optional + IsFailOpen *bool `json:"isFailOpen,omitempty"` + + // If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy. + // +optional + IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"` + // If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy. + // +optional + HealthChecker HealthChecker `json:"healthChecker,omitempty"` +} + +// HealthChecker The health check policy configuration. +// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm). +type HealthChecker struct { + + // The path against which to run the health check. + // Example: `/healthcheck` + // Default value is `/healthz` + UrlPath *string `json:"urlPath,omitempty"` } // NetworkSpec specifies what the OCI networking resources should look like. diff --git a/api/v1beta1/zz_generated.conversion.go b/api/v1beta1/zz_generated.conversion.go index cb3289f0..472c3d0a 100644 --- a/api/v1beta1/zz_generated.conversion.go +++ b/api/v1beta1/zz_generated.conversion.go @@ -110,6 +110,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*BackendSetDetails)(nil), (*v1beta2.BackendSetDetails)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails(a.(*BackendSetDetails), b.(*v1beta2.BackendSetDetails), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.BackendSetDetails)(nil), (*BackendSetDetails)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails(a.(*v1beta2.BackendSetDetails), b.(*BackendSetDetails), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ClusterOptions)(nil), (*v1beta2.ClusterOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ClusterOptions_To_v1beta2_ClusterOptions(a.(*ClusterOptions), b.(*v1beta2.ClusterOptions), scope) }); err != nil { @@ -165,6 +175,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*HealthChecker)(nil), (*v1beta2.HealthChecker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_HealthChecker_To_v1beta2_HealthChecker(a.(*HealthChecker), b.(*v1beta2.HealthChecker), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.HealthChecker)(nil), (*HealthChecker)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_HealthChecker_To_v1beta1_HealthChecker(a.(*v1beta2.HealthChecker), b.(*HealthChecker), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*IcmpOptions)(nil), (*v1beta2.IcmpOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_IcmpOptions_To_v1beta2_IcmpOptions(a.(*IcmpOptions), b.(*v1beta2.IcmpOptions), scope) }); err != nil { @@ -345,6 +365,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*NLBSpec)(nil), (*v1beta2.NLBSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NLBSpec_To_v1beta2_NLBSpec(a.(*NLBSpec), b.(*v1beta2.NLBSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.NLBSpec)(nil), (*NLBSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_NLBSpec_To_v1beta1_NLBSpec(a.(*v1beta2.NLBSpec), b.(*NLBSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*NSG)(nil), (*v1beta2.NSG)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_NSG_To_v1beta2_NSG(a.(*NSG), b.(*v1beta2.NSG), scope) }); err != nil { @@ -1105,6 +1135,36 @@ func Convert_v1beta2_AmdVmPlatformConfig_To_v1beta1_AmdVmPlatformConfig(in *v1be return autoConvert_v1beta2_AmdVmPlatformConfig_To_v1beta1_AmdVmPlatformConfig(in, out, s) } +func autoConvert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails(in *BackendSetDetails, out *v1beta2.BackendSetDetails, s conversion.Scope) error { + out.IsPreserveSource = (*bool)(unsafe.Pointer(in.IsPreserveSource)) + out.IsFailOpen = (*bool)(unsafe.Pointer(in.IsFailOpen)) + out.IsInstantFailoverEnabled = (*bool)(unsafe.Pointer(in.IsInstantFailoverEnabled)) + if err := Convert_v1beta1_HealthChecker_To_v1beta2_HealthChecker(&in.HealthChecker, &out.HealthChecker, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails is an autogenerated conversion function. +func Convert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails(in *BackendSetDetails, out *v1beta2.BackendSetDetails, s conversion.Scope) error { + return autoConvert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails(in, out, s) +} + +func autoConvert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails(in *v1beta2.BackendSetDetails, out *BackendSetDetails, s conversion.Scope) error { + out.IsPreserveSource = (*bool)(unsafe.Pointer(in.IsPreserveSource)) + out.IsFailOpen = (*bool)(unsafe.Pointer(in.IsFailOpen)) + out.IsInstantFailoverEnabled = (*bool)(unsafe.Pointer(in.IsInstantFailoverEnabled)) + if err := Convert_v1beta2_HealthChecker_To_v1beta1_HealthChecker(&in.HealthChecker, &out.HealthChecker, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails is an autogenerated conversion function. +func Convert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails(in *v1beta2.BackendSetDetails, out *BackendSetDetails, s conversion.Scope) error { + return autoConvert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails(in, out, s) +} + func autoConvert_v1beta1_ClusterOptions_To_v1beta2_ClusterOptions(in *ClusterOptions, out *v1beta2.ClusterOptions, s conversion.Scope) error { out.AddOnOptions = (*v1beta2.AddOnOptions)(unsafe.Pointer(in.AddOnOptions)) out.AdmissionControllerOptions = (*v1beta2.AdmissionControllerOptions)(unsafe.Pointer(in.AdmissionControllerOptions)) @@ -1247,6 +1307,26 @@ func Convert_v1beta2_EndpointConfig_To_v1beta1_EndpointConfig(in *v1beta2.Endpoi return autoConvert_v1beta2_EndpointConfig_To_v1beta1_EndpointConfig(in, out, s) } +func autoConvert_v1beta1_HealthChecker_To_v1beta2_HealthChecker(in *HealthChecker, out *v1beta2.HealthChecker, s conversion.Scope) error { + out.UrlPath = (*string)(unsafe.Pointer(in.UrlPath)) + return nil +} + +// Convert_v1beta1_HealthChecker_To_v1beta2_HealthChecker is an autogenerated conversion function. +func Convert_v1beta1_HealthChecker_To_v1beta2_HealthChecker(in *HealthChecker, out *v1beta2.HealthChecker, s conversion.Scope) error { + return autoConvert_v1beta1_HealthChecker_To_v1beta2_HealthChecker(in, out, s) +} + +func autoConvert_v1beta2_HealthChecker_To_v1beta1_HealthChecker(in *v1beta2.HealthChecker, out *HealthChecker, s conversion.Scope) error { + out.UrlPath = (*string)(unsafe.Pointer(in.UrlPath)) + return nil +} + +// Convert_v1beta2_HealthChecker_To_v1beta1_HealthChecker is an autogenerated conversion function. +func Convert_v1beta2_HealthChecker_To_v1beta1_HealthChecker(in *v1beta2.HealthChecker, out *HealthChecker, s conversion.Scope) error { + return autoConvert_v1beta2_HealthChecker_To_v1beta1_HealthChecker(in, out, s) +} + func autoConvert_v1beta1_IcmpOptions_To_v1beta2_IcmpOptions(in *IcmpOptions, out *v1beta2.IcmpOptions, s conversion.Scope) error { out.Type = (*int)(unsafe.Pointer(in.Type)) out.Code = (*int)(unsafe.Pointer(in.Code)) @@ -1710,6 +1790,9 @@ func Convert_v1beta2_LaunchVolumeAttachment_To_v1beta1_LaunchVolumeAttachment(in func autoConvert_v1beta1_LoadBalancer_To_v1beta2_LoadBalancer(in *LoadBalancer, out *v1beta2.LoadBalancer, s conversion.Scope) error { out.Name = in.Name out.LoadBalancerId = (*string)(unsafe.Pointer(in.LoadBalancerId)) + if err := Convert_v1beta1_NLBSpec_To_v1beta2_NLBSpec(&in.NLBSpec, &out.NLBSpec, s); err != nil { + return err + } return nil } @@ -1722,9 +1805,36 @@ func autoConvert_v1beta2_LoadBalancer_To_v1beta1_LoadBalancer(in *v1beta2.LoadBa out.Name = in.Name out.LoadBalancerId = (*string)(unsafe.Pointer(in.LoadBalancerId)) // WARNING: in.LoadBalancerType requires manual conversion: does not exist in peer-type + if err := Convert_v1beta2_NLBSpec_To_v1beta1_NLBSpec(&in.NLBSpec, &out.NLBSpec, s); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_NLBSpec_To_v1beta2_NLBSpec(in *NLBSpec, out *v1beta2.NLBSpec, s conversion.Scope) error { + if err := Convert_v1beta1_BackendSetDetails_To_v1beta2_BackendSetDetails(&in.BackendSetDetails, &out.BackendSetDetails, s); err != nil { + return err + } return nil } +// Convert_v1beta1_NLBSpec_To_v1beta2_NLBSpec is an autogenerated conversion function. +func Convert_v1beta1_NLBSpec_To_v1beta2_NLBSpec(in *NLBSpec, out *v1beta2.NLBSpec, s conversion.Scope) error { + return autoConvert_v1beta1_NLBSpec_To_v1beta2_NLBSpec(in, out, s) +} + +func autoConvert_v1beta2_NLBSpec_To_v1beta1_NLBSpec(in *v1beta2.NLBSpec, out *NLBSpec, s conversion.Scope) error { + if err := Convert_v1beta2_BackendSetDetails_To_v1beta1_BackendSetDetails(&in.BackendSetDetails, &out.BackendSetDetails, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta2_NLBSpec_To_v1beta1_NLBSpec is an autogenerated conversion function. +func Convert_v1beta2_NLBSpec_To_v1beta1_NLBSpec(in *v1beta2.NLBSpec, out *NLBSpec, s conversion.Scope) error { + return autoConvert_v1beta2_NLBSpec_To_v1beta1_NLBSpec(in, out, s) +} + func autoConvert_v1beta1_NSG_To_v1beta2_NSG(in *NSG, out *v1beta2.NSG, s conversion.Scope) error { out.ID = (*string)(unsafe.Pointer(in.ID)) out.Name = in.Name diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 5159206f..fe838dfc 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright (c) 2022, Oracle and/or its affiliates. @@ -308,6 +309,37 @@ func (in *AmdVmPlatformConfig) DeepCopy() *AmdVmPlatformConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackendSetDetails) DeepCopyInto(out *BackendSetDetails) { + *out = *in + if in.IsPreserveSource != nil { + in, out := &in.IsPreserveSource, &out.IsPreserveSource + *out = new(bool) + **out = **in + } + if in.IsFailOpen != nil { + in, out := &in.IsFailOpen, &out.IsFailOpen + *out = new(bool) + **out = **in + } + if in.IsInstantFailoverEnabled != nil { + in, out := &in.IsInstantFailoverEnabled, &out.IsInstantFailoverEnabled + *out = new(bool) + **out = **in + } + in.HealthChecker.DeepCopyInto(&out.HealthChecker) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendSetDetails. +func (in *BackendSetDetails) DeepCopy() *BackendSetDetails { + if in == nil { + return nil + } + out := new(BackendSetDetails) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterOptions) DeepCopyInto(out *ClusterOptions) { *out = *in @@ -459,6 +491,26 @@ func (in *EndpointConfig) DeepCopy() *EndpointConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthChecker) DeepCopyInto(out *HealthChecker) { + *out = *in + if in.UrlPath != nil { + in, out := &in.UrlPath, &out.UrlPath + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthChecker. +func (in *HealthChecker) DeepCopy() *HealthChecker { + if in == nil { + return nil + } + out := new(HealthChecker) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IcmpOptions) DeepCopyInto(out *IcmpOptions) { *out = *in @@ -994,6 +1046,7 @@ func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { *out = new(string) **out = **in } + in.NLBSpec.DeepCopyInto(&out.NLBSpec) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. @@ -1006,6 +1059,22 @@ func (in *LoadBalancer) DeepCopy() *LoadBalancer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NLBSpec) DeepCopyInto(out *NLBSpec) { + *out = *in + in.BackendSetDetails.DeepCopyInto(&out.BackendSetDetails) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NLBSpec. +func (in *NLBSpec) DeepCopy() *NLBSpec { + if in == nil { + return nil + } + out := new(NLBSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NSG) DeepCopyInto(out *NSG) { *out = *in @@ -1322,8 +1391,7 @@ func (in *OCIClusterSpec) DeepCopyInto(out *OCIClusterSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val @@ -1636,8 +1704,7 @@ func (in *OCIMachineSpec) DeepCopyInto(out *OCIMachineSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val @@ -1868,8 +1935,7 @@ func (in *OCIManagedClusterSpec) DeepCopyInto(out *OCIManagedClusterSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index ed71dab6..1cf74ef5 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -955,6 +955,49 @@ type LoadBalancer struct { // Type of Load Balancer: NLB (default) or LBaaS. // +optional LoadBalancerType LoadBalancerType `json:"loadBalancerType,omitempty"` + + // The NLB Spec + // +optional + NLBSpec NLBSpec `json:"nlbSpec,omitempty"` +} + +// NLBSpec specifies the NLB spec. +type NLBSpec struct { + // BackendSetDetails specifies the configuration of a network load balancer backend set. + // +optional + BackendSetDetails BackendSetDetails `json:"backendSetDetails,omitempty"` +} + +// BackendSetDetails specifies the configuration of a network load balancer backend set. +type BackendSetDetails struct { + // If this parameter is enabled, then the network load balancer preserves the source IP of the packet when it is forwarded to backends. + // Backends see the original source IP. If the isPreserveSourceDestination parameter is enabled for the network load balancer resource, then this parameter cannot be disabled. + // The value is false by default. + // +optional + IsPreserveSource *bool `json:"isPreserveSource,omitempty"` + + // If enabled, the network load balancer will continue to distribute traffic in the configured distribution in the event all backends are unhealthy. + // The value is false by default. + // +optional + IsFailOpen *bool `json:"isFailOpen,omitempty"` + + // If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy. + // +optional + IsInstantFailoverEnabled *bool `json:"isInstantFailoverEnabled,omitempty"` + + // If enabled existing connections will be forwarded to an alternative healthy backend as soon as current backend becomes unhealthy. + // +optional + HealthChecker HealthChecker `json:"healthChecker,omitempty"` +} + +// HealthChecker The health check policy configuration. +// For more information, see Editing Health Check Policies (https://docs.cloud.oracle.com/Content/NetworkLoadBalancer/HealthCheckPolicies/health-check-policy-management.htm). +type HealthChecker struct { + + // The path against which to run the health check. + // Example: `/healthcheck` + // Default value is `/healthz` + UrlPath *string `json:"urlPath,omitempty"` } // NetworkSpec specifies what the OCI networking resources should look like. diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 2ee829cc..728706c5 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright (c) 2022, Oracle and/or its affiliates. @@ -425,6 +426,37 @@ func (in *AmdVmPlatformConfig) DeepCopy() *AmdVmPlatformConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BackendSetDetails) DeepCopyInto(out *BackendSetDetails) { + *out = *in + if in.IsPreserveSource != nil { + in, out := &in.IsPreserveSource, &out.IsPreserveSource + *out = new(bool) + **out = **in + } + if in.IsFailOpen != nil { + in, out := &in.IsFailOpen, &out.IsFailOpen + *out = new(bool) + **out = **in + } + if in.IsInstantFailoverEnabled != nil { + in, out := &in.IsInstantFailoverEnabled, &out.IsInstantFailoverEnabled + *out = new(bool) + **out = **in + } + in.HealthChecker.DeepCopyInto(&out.HealthChecker) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendSetDetails. +func (in *BackendSetDetails) DeepCopy() *BackendSetDetails { + if in == nil { + return nil + } + out := new(BackendSetDetails) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClientOverrides) DeepCopyInto(out *ClientOverrides) { *out = *in @@ -631,6 +663,26 @@ func (in *EndpointConfig) DeepCopy() *EndpointConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthChecker) DeepCopyInto(out *HealthChecker) { + *out = *in + if in.UrlPath != nil { + in, out := &in.UrlPath, &out.UrlPath + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthChecker. +func (in *HealthChecker) DeepCopy() *HealthChecker { + if in == nil { + return nil + } + out := new(HealthChecker) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IcmpOptions) DeepCopyInto(out *IcmpOptions) { *out = *in @@ -1181,6 +1233,7 @@ func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { *out = new(string) **out = **in } + in.NLBSpec.DeepCopyInto(&out.NLBSpec) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. @@ -1213,6 +1266,22 @@ func (in *NATGateway) DeepCopy() *NATGateway { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NLBSpec) DeepCopyInto(out *NLBSpec) { + *out = *in + in.BackendSetDetails.DeepCopyInto(&out.BackendSetDetails) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NLBSpec. +func (in *NLBSpec) DeepCopy() *NLBSpec { + if in == nil { + return nil + } + out := new(NLBSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NSG) DeepCopyInto(out *NSG) { *out = *in @@ -1555,8 +1624,7 @@ func (in *OCIClusterSpec) DeepCopyInto(out *OCIClusterSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val @@ -1867,8 +1935,7 @@ func (in *OCIMachineSpec) DeepCopyInto(out *OCIMachineSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val @@ -2106,8 +2173,7 @@ func (in *OCIManagedClusterSpec) DeepCopyInto(out *OCIManagedClusterSpec) { if val == nil { (*out)[key] = nil } else { - inVal := (*in)[key] - in, out := &inVal, &outVal + in, out := &val, &outVal *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val diff --git a/cloud/scope/clients.go b/cloud/scope/clients.go index e7a163b5..e6b8d6c6 100644 --- a/cloud/scope/clients.go +++ b/cloud/scope/clients.go @@ -345,4 +345,3 @@ func setVersionHeader() func(request *http.Request) error { return nil } } - diff --git a/cloud/scope/network_load_balancer_reconciler.go b/cloud/scope/network_load_balancer_reconciler.go index 0f31c28a..904badf7 100644 --- a/cloud/scope/network_load_balancer_reconciler.go +++ b/cloud/scope/network_load_balancer_reconciler.go @@ -99,7 +99,8 @@ func (s *ClusterScope) DeleteApiServerNLB(ctx context.Context) error { // NLBSpec builds the Network LoadBalancer from the ClusterScope and returns it func (s *ClusterScope) NLBSpec() infrastructurev1beta2.LoadBalancer { nlbSpec := infrastructurev1beta2.LoadBalancer{ - Name: s.GetControlPlaneLoadBalancerName(), + Name: s.GetControlPlaneLoadBalancerName(), + NLBSpec: s.OCIClusterAccessor.GetNetworkSpec().APIServerLB.NLBSpec, } return nlbSpec } @@ -142,6 +143,10 @@ func (s *ClusterScope) UpdateNLB(ctx context.Context, nlb infrastructurev1beta2. // See https://docs.oracle.com/en-us/iaas/Content/NetworkLoadBalancer/overview.htm for more details on the Network // Load Balancer func (s *ClusterScope) CreateNLB(ctx context.Context, lb infrastructurev1beta2.LoadBalancer) (*string, *string, error) { + isPreserverSourceIp := lb.NLBSpec.BackendSetDetails.IsPreserveSource + if isPreserverSourceIp == nil { + isPreserverSourceIp = common.Bool(false) + } listenerDetails := make(map[string]networkloadbalancer.ListenerDetails) listenerDetails[APIServerLBListener] = networkloadbalancer.ListenerDetails{ Protocol: networkloadbalancer.ListenerProtocolsTcp, @@ -151,13 +156,19 @@ func (s *ClusterScope) CreateNLB(ctx context.Context, lb infrastructurev1beta2.L } backendSetDetails := make(map[string]networkloadbalancer.BackendSetDetails) + healthCheckUrl := lb.NLBSpec.BackendSetDetails.HealthChecker.UrlPath + if healthCheckUrl == nil { + healthCheckUrl = common.String("/healthz") + } backendSetDetails[APIServerLBBackendSetName] = networkloadbalancer.BackendSetDetails{ - Policy: LoadBalancerPolicy, - IsPreserveSource: common.Bool(false), + Policy: LoadBalancerPolicy, + IsPreserveSource: isPreserverSourceIp, + IsFailOpen: lb.NLBSpec.BackendSetDetails.IsFailOpen, + IsInstantFailoverEnabled: lb.NLBSpec.BackendSetDetails.IsInstantFailoverEnabled, HealthChecker: &networkloadbalancer.HealthChecker{ Port: common.Int(int(s.APIServerPort())), Protocol: networkloadbalancer.HealthCheckProtocolsHttps, - UrlPath: common.String("/healthz"), + UrlPath: healthCheckUrl, ReturnCode: common.Int(200), }, Backends: []networkloadbalancer.Backend{}, diff --git a/cloud/scope/network_load_balancer_reconciler_test.go b/cloud/scope/network_load_balancer_reconciler_test.go index 5e4b2b5c..d021b7c3 100644 --- a/cloud/scope/network_load_balancer_reconciler_test.go +++ b/cloud/scope/network_load_balancer_reconciler_test.go @@ -245,7 +245,7 @@ func TestNLBReconciliation(t *testing.T) { }, }, { - name: "create network load balancer", + name: "create network load balancer, default values", errorExpected: false, testSpecificSetup: func(clusterScope *ClusterScope, nlbClient *mock_nlb.MockNetworkLoadBalancerClient) { clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.Subnets = []*infrastructurev1beta2.Subnet{ @@ -266,6 +266,7 @@ func TestNLBReconciliation(t *testing.T) { }, }, } + clusterScope.OCIClusterAccessor.GetNetworkSpec().APIServerLB = infrastructurev1beta2.LoadBalancer{} definedTags, definedTagsInterface := getDefinedTags() ociClusterAccessor.OCICluster.Spec.DefinedTags = definedTags nlbClient.EXPECT().ListNetworkLoadBalancers(gomock.Any(), gomock.Eq(networkloadbalancer.ListNetworkLoadBalancersRequest{ @@ -340,6 +341,116 @@ func TestNLBReconciliation(t *testing.T) { }, nil) }, }, + { + name: "create network load balancer", + errorExpected: false, + testSpecificSetup: func(clusterScope *ClusterScope, nlbClient *mock_nlb.MockNetworkLoadBalancerClient) { + clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.Subnets = []*infrastructurev1beta2.Subnet{ + { + Role: infrastructurev1beta2.ControlPlaneEndpointRole, + ID: common.String("s1"), + }, + } + clusterScope.OCIClusterAccessor.GetNetworkSpec().Vcn.NetworkSecurityGroup = infrastructurev1beta2.NetworkSecurityGroup{ + List: []*infrastructurev1beta2.NSG{ + { + Role: infrastructurev1beta2.ControlPlaneEndpointRole, + ID: common.String("nsg1"), + }, + { + Role: infrastructurev1beta2.ControlPlaneEndpointRole, + ID: common.String("nsg2"), + }, + }, + } + clusterScope.OCIClusterAccessor.GetNetworkSpec().APIServerLB = infrastructurev1beta2.LoadBalancer{ + NLBSpec: infrastructurev1beta2.NLBSpec{ + BackendSetDetails: infrastructurev1beta2.BackendSetDetails{ + IsInstantFailoverEnabled: common.Bool(true), + IsFailOpen: common.Bool(false), + IsPreserveSource: common.Bool(false), + HealthChecker: infrastructurev1beta2.HealthChecker{ + UrlPath: common.String("readyz"), + }, + }, + }, + } + definedTags, definedTagsInterface := getDefinedTags() + ociClusterAccessor.OCICluster.Spec.DefinedTags = definedTags + nlbClient.EXPECT().ListNetworkLoadBalancers(gomock.Any(), gomock.Eq(networkloadbalancer.ListNetworkLoadBalancersRequest{ + CompartmentId: common.String("compartment-id"), + DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")), + })). + Return(networkloadbalancer.ListNetworkLoadBalancersResponse{}, nil) + nlbClient.EXPECT().CreateNetworkLoadBalancer(gomock.Any(), gomock.Eq(networkloadbalancer.CreateNetworkLoadBalancerRequest{ + CreateNetworkLoadBalancerDetails: networkloadbalancer.CreateNetworkLoadBalancerDetails{ + CompartmentId: common.String("compartment-id"), + DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")), + SubnetId: common.String("s1"), + IsPrivate: common.Bool(false), + NetworkSecurityGroupIds: []string{"nsg1", "nsg2"}, + Listeners: map[string]networkloadbalancer.ListenerDetails{ + APIServerLBListener: { + Protocol: networkloadbalancer.ListenerProtocolsTcp, + Port: common.Int(6443), + DefaultBackendSetName: common.String(APIServerLBBackendSetName), + Name: common.String(APIServerLBListener), + }, + }, + BackendSets: map[string]networkloadbalancer.BackendSetDetails{ + APIServerLBBackendSetName: networkloadbalancer.BackendSetDetails{ + Policy: LoadBalancerPolicy, + IsInstantFailoverEnabled: common.Bool(true), + IsFailOpen: common.Bool(false), + IsPreserveSource: common.Bool(false), + HealthChecker: &networkloadbalancer.HealthChecker{ + Port: common.Int(6443), + Protocol: networkloadbalancer.HealthCheckProtocolsHttps, + UrlPath: common.String("readyz"), + ReturnCode: common.Int(200), + }, + Backends: []networkloadbalancer.Backend{}, + }, + }, + FreeformTags: tags, + DefinedTags: definedTagsInterface, + }, + OpcRetryToken: ociutil.GetOPCRetryToken("%s-%s", "create-nlb", string("resource_uid")), + })). + Return(networkloadbalancer.CreateNetworkLoadBalancerResponse{ + NetworkLoadBalancer: networkloadbalancer.NetworkLoadBalancer{ + Id: common.String("nlb-id"), + }, + OpcWorkRequestId: common.String("opc-wr-id"), + }, nil) + nlbClient.EXPECT().GetWorkRequest(gomock.Any(), gomock.Eq(networkloadbalancer.GetWorkRequestRequest{ + WorkRequestId: common.String("opc-wr-id"), + })).Return(networkloadbalancer.GetWorkRequestResponse{ + WorkRequest: networkloadbalancer.WorkRequest{ + Status: networkloadbalancer.OperationStatusSucceeded, + }, + }, nil) + + nlbClient.EXPECT().GetNetworkLoadBalancer(gomock.Any(), gomock.Eq(networkloadbalancer.GetNetworkLoadBalancerRequest{ + NetworkLoadBalancerId: common.String("nlb-id"), + })). + Return(networkloadbalancer.GetNetworkLoadBalancerResponse{ + NetworkLoadBalancer: networkloadbalancer.NetworkLoadBalancer{ + Id: common.String("nlb-id"), + FreeformTags: tags, + DefinedTags: make(map[string]map[string]interface{}), + IsPrivate: common.Bool(false), + DisplayName: common.String(fmt.Sprintf("%s-%s", "cluster", "apiserver")), + IpAddresses: []networkloadbalancer.IpAddress{ + { + IpAddress: common.String("2.2.2.2"), + IsPublic: common.Bool(true), + }, + }, + }, + }, nil) + }, + }, { name: "create network load balancer request fails", errorExpected: true, diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml index 916232c1..987067cc 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml @@ -117,6 +117,46 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + properties: + urlPath: + description: 'The path against which to run the + health check. Example: `/healthcheck` Default + value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load balancer + will continue to distribute traffic in the configured + distribution in the event all backends are unhealthy. + The value is false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, then the + network load balancer preserves the source IP of + the packet when it is forwarded to backends. Backends + see the original source IP. If the isPreserveSourceDestination + parameter is enabled for the network load balancer + resource, then this parameter cannot be disabled. + The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking spec(VCN @@ -1288,6 +1328,46 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + properties: + urlPath: + description: 'The path against which to run the + health check. Example: `/healthcheck` Default + value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load balancer + will continue to distribute traffic in the configured + distribution in the event all backends are unhealthy. + The value is false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, then the + network load balancer preserves the source IP of + the packet when it is forwarded to backends. Backends + see the original source IP. If the isPreserveSourceDestination + parameter is enabled for the network load balancer + resource, then this parameter cannot be disabled. + The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking spec(VCN diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml index 96816b6f..fcea3081 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ociclustertemplates.yaml @@ -129,6 +129,50 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + properties: + urlPath: + description: 'The path against which to + run the health check. Example: `/healthcheck` + Default value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load + balancer will continue to distribute traffic + in the configured distribution in the event + all backends are unhealthy. The value is + false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, + then the network load balancer preserves + the source IP of the packet when it is forwarded + to backends. Backends see the original source + IP. If the isPreserveSourceDestination parameter + is enabled for the network load balancer + resource, then this parameter cannot be + disabled. The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking @@ -1347,6 +1391,50 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + properties: + urlPath: + description: 'The path against which to + run the health check. Example: `/healthcheck` + Default value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load + balancer will continue to distribute traffic + in the configured distribution in the event + all backends are unhealthy. The value is + false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, + then the network load balancer preserves + the source IP of the packet when it is forwarded + to backends. Backends see the original source + IP. If the isPreserveSourceDestination parameter + is enabled for the network load balancer + resource, then this parameter cannot be + disabled. The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml index 5e33eba8..4f7032ca 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclusters.yaml @@ -120,6 +120,46 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + properties: + urlPath: + description: 'The path against which to run the + health check. Example: `/healthcheck` Default + value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load balancer + will continue to distribute traffic in the configured + distribution in the event all backends are unhealthy. + The value is false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, then the + network load balancer preserves the source IP of + the packet when it is forwarded to backends. Backends + see the original source IP. If the isPreserveSourceDestination + parameter is enabled for the network load balancer + resource, then this parameter cannot be disabled. + The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking spec(VCN @@ -1294,6 +1334,46 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + properties: + urlPath: + description: 'The path against which to run the + health check. Example: `/healthcheck` Default + value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load balancer + will continue to distribute traffic in the configured + distribution in the event all backends are unhealthy. + The value is false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections will + be forwarded to an alternative healthy backend as + soon as current backend becomes unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, then the + network load balancer preserves the source IP of + the packet when it is forwarded to backends. Backends + see the original source IP. If the isPreserveSourceDestination + parameter is enabled for the network load balancer + resource, then this parameter cannot be disabled. + The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking spec(VCN diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml index 99b5501b..e7fb844b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedclustertemplates.yaml @@ -134,6 +134,50 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + properties: + urlPath: + description: 'The path against which to + run the health check. Example: `/healthcheck` + Default value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load + balancer will continue to distribute traffic + in the configured distribution in the event + all backends are unhealthy. The value is + false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, + then the network load balancer preserves + the source IP of the packet when it is forwarded + to backends. Backends see the original source + IP. If the isPreserveSourceDestination parameter + is enabled for the network load balancer + resource, then this parameter cannot be + disabled. The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking @@ -1357,6 +1401,50 @@ spec: name: description: LoadBalancer Name. type: string + nlbSpec: + description: The NLB Spec + properties: + backendSetDetails: + description: BackendSetDetails specifies the configuration + of a network load balancer backend set. + properties: + healthChecker: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + properties: + urlPath: + description: 'The path against which to + run the health check. Example: `/healthcheck` + Default value is `/healthz`' + type: string + type: object + isFailOpen: + description: If enabled, the network load + balancer will continue to distribute traffic + in the configured distribution in the event + all backends are unhealthy. The value is + false by default. + type: boolean + isInstantFailoverEnabled: + description: If enabled existing connections + will be forwarded to an alternative healthy + backend as soon as current backend becomes + unhealthy. + type: boolean + isPreserveSource: + description: If this parameter is enabled, + then the network load balancer preserves + the source IP of the packet when it is forwarded + to backends. Backends see the original source + IP. If the isPreserveSourceDestination parameter + is enabled for the network load balancer + resource, then this parameter cannot be + disabled. The value is false by default. + type: boolean + type: object + type: object type: object skipNetworkManagement: description: SkipNetworkManagement defines if the networking diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 5ec6f957..37aa0a68 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -3,7 +3,7 @@ # It should be run by config/default # Labels to add to all resources and selectors. commonLabels: - cluster.x-k8s.io/v1beta1: v1beta1 + cluster.x-k8s.io/v1beta1: v1beta1_v1beta2 resources: - bases/infrastructure.cluster.x-k8s.io_ociclusters.yaml diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go index f3a13817..d5951691 100644 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright (c) 2022, Oracle and/or its affiliates. diff --git a/exp/api/v1beta2/zz_generated.deepcopy.go b/exp/api/v1beta2/zz_generated.deepcopy.go index 4a528edc..ab5d8c5d 100644 --- a/exp/api/v1beta2/zz_generated.deepcopy.go +++ b/exp/api/v1beta2/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright (c) 2022, Oracle and/or its affiliates. diff --git a/go.mod b/go.mod index 3ecb2412..ac0aee32 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/gofuzz v1.2.0 github.com/onsi/ginkgo/v2 v2.13.1 github.com/onsi/gomega v1.30.0 - github.com/oracle/oci-go-sdk/v65 v65.61.2 + github.com/oracle/oci-go-sdk/v65 v65.70.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 86b10ae8..df821a34 100644 --- a/go.sum +++ b/go.sum @@ -290,8 +290,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/oracle/oci-go-sdk/v65 v65.61.2 h1:NiwGl+g1r1ibBbntqBeYWgP8GuSDPYRevpM4MUkBFpg= -github.com/oracle/oci-go-sdk/v65 v65.61.2/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= +github.com/oracle/oci-go-sdk/v65 v65.70.0 h1:gLa0IX/SidTm60VbHabnImrW3hyymmNLQJy6gZGrgDA= +github.com/oracle/oci-go-sdk/v65 v65.70.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= diff --git a/metadata.yaml b/metadata.yaml index 03effec3..27e5115b 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -49,4 +49,7 @@ releaseSeries: contract: v1beta1 - major: 0 minor: 15 + contract: v1beta1 + - major: 0 + minor: 16 contract: v1beta1 \ No newline at end of file