From 050738af13251ed6c84dd09d0aa02399189ed6eb Mon Sep 17 00:00:00 2001 From: Shyam Radhakrishnan Date: Wed, 28 Jun 2023 09:35:45 +0530 Subject: [PATCH 1/2] Add Subnet Id and NSG ID to machine spec --- api/v1beta1/conversion.go | 7 -- api/v1beta1/conversion_test.go | 4 -- api/v1beta1/types.go | 4 +- api/v1beta1/zz_generated.conversion.go | 6 +- api/v1beta2/types.go | 7 ++ api/v1beta2/zz_generated.deepcopy.go | 10 +++ cloud/scope/machine.go | 23 ++++--- cloud/scope/machine_test.go | 68 +++++++++++++++++++ ...ture.cluster.x-k8s.io_ocimachinepools.yaml | 15 +++- ...tructure.cluster.x-k8s.io_ocimachines.yaml | 17 +++-- ....cluster.x-k8s.io_ocimachinetemplates.yaml | 15 +++- 11 files changed, 143 insertions(+), 33 deletions(-) diff --git a/api/v1beta1/conversion.go b/api/v1beta1/conversion.go index 9b981d24..8d3b757a 100644 --- a/api/v1beta1/conversion.go +++ b/api/v1beta1/conversion.go @@ -17,7 +17,6 @@ package v1beta1 import ( - "errors" "github.com/oracle/cluster-api-provider-oci/api/v1beta2" "k8s.io/apimachinery/pkg/conversion" ) @@ -115,12 +114,6 @@ func Convert_v1beta1_OCIMachineSpec_To_v1beta2_OCIMachineSpec(in *OCIMachineSpec if err != nil { return err } - if in.NetworkDetails.SubnetId != nil { - return errors.New("deprecated field NetworkDetails.SubnetId is present in OCIMachineSpec") - } - if in.NetworkDetails.NSGId != nil { - return errors.New("deprecated field NetworkDetails.NSGId is present in OCIMachineSpec") - } if in.NSGName != "" && len(in.NetworkDetails.NsgNames) == 0 { out.NetworkDetails.NsgNames = []string{in.NSGName} } diff --git a/api/v1beta1/conversion_test.go b/api/v1beta1/conversion_test.go index 5d6883b1..e9f9a2e4 100644 --- a/api/v1beta1/conversion_test.go +++ b/api/v1beta1/conversion_test.go @@ -40,8 +40,6 @@ func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} { func OCIMachineFuzzer(obj *OCIMachine, c fuzz.Continue) { c.FuzzNoCustom(obj) // nil fields which have been removed so that tests dont fail - obj.Spec.NetworkDetails.NSGId = nil - obj.Spec.NetworkDetails.SubnetId = nil obj.Spec.NSGName = "" } @@ -92,8 +90,6 @@ func OCIClusterTemplateFuzzer(obj *OCIClusterTemplate, c fuzz.Continue) { func OCIMachineTemplateFuzzer(obj *OCIMachineTemplate, c fuzz.Continue) { c.FuzzNoCustom(obj) // nil fields which ave been removed so that tests dont fail - obj.Spec.Template.Spec.NetworkDetails.NSGId = nil - obj.Spec.Template.Spec.NetworkDetails.SubnetId = nil obj.Spec.Template.Spec.NSGName = "" } diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index 36a7c8f2..decf404e 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -34,8 +34,7 @@ var OCIManagedClusterSubnetRoles = []Role{PodRole, ControlPlaneEndpointRole, Wor // NetworkDetails defines the configuration options for the network type NetworkDetails struct { - // SubnetId defines the ID of the subnet to use. - // Deprecated, use SubnetName parameter + // SubnetId defines the ID of the subnet to use. This parameter takes priority over SubnetName. SubnetId *string `json:"subnetId,omitempty"` // AssignPublicIp defines whether the instance should have a public IP address @@ -44,6 +43,7 @@ type NetworkDetails struct { // SubnetName defines the subnet name to use for the VNIC SubnetName string `json:"subnetName,omitempty"` + // NSGId defines the ID of the NSG to use. This parameter takes priority over NsgNames. // Deprecated, use NsgNames parameter to define the NSGs NSGId *string `json:"nsgId,omitempty"` diff --git a/api/v1beta1/zz_generated.conversion.go b/api/v1beta1/zz_generated.conversion.go index 7c6b2869..e1af8f90 100644 --- a/api/v1beta1/zz_generated.conversion.go +++ b/api/v1beta1/zz_generated.conversion.go @@ -1262,10 +1262,10 @@ func Convert_v1beta2_NSG_To_v1beta1_NSG(in *v1beta2.NSG, out *NSG, s conversion. } func autoConvert_v1beta1_NetworkDetails_To_v1beta2_NetworkDetails(in *NetworkDetails, out *v1beta2.NetworkDetails, s conversion.Scope) error { - // WARNING: in.SubnetId requires manual conversion: does not exist in peer-type + out.SubnetId = (*string)(unsafe.Pointer(in.SubnetId)) out.AssignPublicIp = in.AssignPublicIp out.SubnetName = in.SubnetName - // WARNING: in.NSGId requires manual conversion: does not exist in peer-type + out.NSGId = (*string)(unsafe.Pointer(in.NSGId)) out.SkipSourceDestCheck = (*bool)(unsafe.Pointer(in.SkipSourceDestCheck)) out.NsgNames = *(*[]string)(unsafe.Pointer(&in.NsgNames)) out.HostnameLabel = (*string)(unsafe.Pointer(in.HostnameLabel)) @@ -1275,9 +1275,11 @@ func autoConvert_v1beta1_NetworkDetails_To_v1beta2_NetworkDetails(in *NetworkDet } func autoConvert_v1beta2_NetworkDetails_To_v1beta1_NetworkDetails(in *v1beta2.NetworkDetails, out *NetworkDetails, s conversion.Scope) error { + out.SubnetId = (*string)(unsafe.Pointer(in.SubnetId)) out.AssignPublicIp = in.AssignPublicIp out.SubnetName = in.SubnetName out.SkipSourceDestCheck = (*bool)(unsafe.Pointer(in.SkipSourceDestCheck)) + out.NSGId = (*string)(unsafe.Pointer(in.NSGId)) out.NsgNames = *(*[]string)(unsafe.Pointer(&in.NsgNames)) out.HostnameLabel = (*string)(unsafe.Pointer(in.HostnameLabel)) out.DisplayName = (*string)(unsafe.Pointer(in.DisplayName)) diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index 5544f530..1ddbbf29 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -34,6 +34,10 @@ var OCIManagedClusterSubnetRoles = []Role{PodRole, ControlPlaneEndpointRole, Wor // NetworkDetails defines the configuration options for the network type NetworkDetails struct { + // SubnetId defines the ID of the subnet to use. + // Deprecated, use SubnetName parameter + SubnetId *string `json:"subnetId,omitempty"` + // AssignPublicIp defines whether the instance should have a public IP address AssignPublicIp bool `json:"assignPublicIp,omitempty"` @@ -43,6 +47,9 @@ type NetworkDetails struct { // SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. SkipSourceDestCheck *bool `json:"skipSourceDestCheck,omitempty"` + // Deprecated, use NsgNames parameter to define the NSGs + NSGId *string `json:"nsgId,omitempty"` + // NsgNames defines a list of the nsg names of the network security groups (NSGs) to add the VNIC to. NsgNames []string `json:"nsgNames,omitempty"` diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 25e07349..bcf10632 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -860,11 +860,21 @@ func (in *NSG) DeepCopy() *NSG { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkDetails) DeepCopyInto(out *NetworkDetails) { *out = *in + if in.SubnetId != nil { + in, out := &in.SubnetId, &out.SubnetId + *out = new(string) + **out = **in + } if in.SkipSourceDestCheck != nil { in, out := &in.SkipSourceDestCheck, &out.SkipSourceDestCheck *out = new(bool) **out = **in } + if in.NSGId != nil { + in, out := &in.NSGId, &out.NSGId + *out = new(string) + **out = **in + } if in.NsgNames != nil { in, out := &in.NsgNames, &out.NsgNames *out = make([]string, len(*in)) diff --git a/cloud/scope/machine.go b/cloud/scope/machine.go index e037279c..bc007632 100644 --- a/cloud/scope/machine.go +++ b/cloud/scope/machine.go @@ -178,18 +178,25 @@ func (m *MachineScope) GetOrCreateMachine(ctx context.Context) (*core.Instance, sourceDetails.BootVolumeVpusPerGB = m.OCIMachine.Spec.InstanceSourceViaImageDetails.BootVolumeVpusPerGB } - var subnetId *string - if m.IsControlPlane() { - subnetId = m.getGetControlPlaneMachineSubnet() - } else { - subnetId = m.getWorkerMachineSubnet() + subnetId := m.OCIMachine.Spec.NetworkDetails.SubnetId + if subnetId == nil { + if m.IsControlPlane() { + subnetId = m.getGetControlPlaneMachineSubnet() + } else { + subnetId = m.getWorkerMachineSubnet() + } } var nsgIds []string - if m.IsControlPlane() { - nsgIds = m.getGetControlPlaneMachineNSGs() + nsgId := m.OCIMachine.Spec.NetworkDetails.NSGId + if nsgId != nil { + nsgIds = []string{*nsgId} } else { - nsgIds = m.getWorkerMachineNSGs() + if m.IsControlPlane() { + nsgIds = m.getGetControlPlaneMachineNSGs() + } else { + nsgIds = m.getWorkerMachineNSGs() + } } failureDomain := m.Machine.Spec.FailureDomain diff --git a/cloud/scope/machine_test.go b/cloud/scope/machine_test.go index 14408c3b..1c0d8126 100644 --- a/cloud/scope/machine_test.go +++ b/cloud/scope/machine_test.go @@ -381,6 +381,74 @@ func TestInstanceReconciliation(t *testing.T) { OpcRetryToken: ociutil.GetOPCRetryToken("machineuid")})).Return(core.LaunchInstanceResponse{}, nil) }, }, + { + name: "check all params together, with subnet id set", + errorExpected: false, + testSpecificSetup: func(machineScope *MachineScope, computeClient *mock_compute.MockComputeClient) { + setupAllParams(ms) + ms.OCIMachine.Spec.CapacityReservationId = common.String("cap-id") + ms.OCIMachine.Spec.DedicatedVmHostId = common.String("dedicated-host-id") + ms.OCIMachine.Spec.NetworkDetails.HostnameLabel = common.String("hostname-label") + ms.OCIMachine.Spec.NetworkDetails.SubnetId = common.String("subnet-machine-id") + ms.OCIMachine.Spec.NetworkDetails.NSGId = common.String("nsg-machine-id") + ms.OCIMachine.Spec.NetworkDetails.SkipSourceDestCheck = common.Bool(true) + ms.OCIMachine.Spec.NetworkDetails.AssignPrivateDnsRecord = common.Bool(true) + ms.OCIMachine.Spec.NetworkDetails.DisplayName = common.String("display-name") + ms.OCIMachine.Spec.InstanceSourceViaImageDetails = &infrastructurev1beta2.InstanceSourceViaImageConfig{ + KmsKeyId: common.String("kms-key-id"), + BootVolumeVpusPerGB: common.Int64(32), + } + computeClient.EXPECT().ListInstances(gomock.Any(), gomock.Eq(core.ListInstancesRequest{ + DisplayName: common.String("name"), + CompartmentId: common.String("test"), + })).Return(core.ListInstancesResponse{}, nil) + + launchDetails := core.LaunchInstanceDetails{DisplayName: common.String("name"), + CapacityReservationId: common.String("cap-id"), + DedicatedVmHostId: common.String("dedicated-host-id"), + SourceDetails: core.InstanceSourceViaImageDetails{ + ImageId: common.String("image"), + BootVolumeSizeInGBs: common.Int64(120), + KmsKeyId: common.String("kms-key-id"), + BootVolumeVpusPerGB: common.Int64(32), + }, + CreateVnicDetails: &core.CreateVnicDetails{ + SubnetId: common.String("subnet-machine-id"), + AssignPublicIp: common.Bool(false), + DefinedTags: map[string]map[string]interface{}{}, + FreeformTags: map[string]string{ + ociutil.CreatedBy: ociutil.OCIClusterAPIProvider, + ociutil.ClusterResourceIdentifier: "resource_uid", + }, + NsgIds: []string{"nsg-machine-id"}, + HostnameLabel: common.String("hostname-label"), + SkipSourceDestCheck: common.Bool(true), + AssignPrivateDnsRecord: common.Bool(true), + DisplayName: common.String("display-name"), + }, + Metadata: map[string]string{ + "user_data": base64.StdEncoding.EncodeToString([]byte("test")), + }, + Shape: common.String("shape"), + ShapeConfig: &core.LaunchInstanceShapeConfigDetails{ + Ocpus: common.Float32(2), + MemoryInGBs: common.Float32(100), + BaselineOcpuUtilization: core.LaunchInstanceShapeConfigDetailsBaselineOcpuUtilization8, + }, + AvailabilityDomain: common.String("ad2"), + CompartmentId: common.String("test"), + IsPvEncryptionInTransitEnabled: common.Bool(true), + DefinedTags: map[string]map[string]interface{}{}, + FreeformTags: map[string]string{ + ociutil.CreatedBy: ociutil.OCIClusterAPIProvider, + ociutil.ClusterResourceIdentifier: "resource_uid", + }, + } + computeClient.EXPECT().LaunchInstance(gomock.Any(), gomock.Eq(core.LaunchInstanceRequest{ + LaunchInstanceDetails: launchDetails, + OpcRetryToken: ociutil.GetOPCRetryToken("machineuid")})).Return(core.LaunchInstanceResponse{}, nil) + }, + }, { name: "shape config is empty", errorExpected: false, diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml index 53e2afaa..fe5133b7 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml @@ -204,8 +204,9 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to define - the NSGs" + description: "NSGId defines the ID of the NSG to use. This + parameter takes priority over NsgNames. Deprecated, use + \tNsgNames parameter to define the NSGs" type: string nsgNames: description: NsgNames defines a list of the nsg names of the @@ -219,7 +220,7 @@ spec: type: boolean subnetId: description: SubnetId defines the ID of the subnet to use. - Deprecated, use SubnetName parameter + This parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use for @@ -920,6 +921,10 @@ spec: description: HostnameLabel defines the hostname for the VNIC's primary private IP. Used for DNS. type: string + nsgId: + description: "Deprecated, use \tNsgNames parameter to define + the NSGs" + type: string nsgNames: description: NsgNames defines a list of the nsg names of the network security groups (NSGs) to add the VNIC to. @@ -930,6 +935,10 @@ spec: description: SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. type: boolean + subnetId: + description: SubnetId defines the ID of the subnet to use. + Deprecated, use SubnetName parameter + type: string subnetName: description: SubnetName defines the subnet name to use for the VNIC diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml index 0ae23184..16dcc625 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml @@ -270,8 +270,9 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to define the - NSGs" + description: "NSGId defines the ID of the NSG to use. This parameter + takes priority over NsgNames. Deprecated, use \tNsgNames parameter + to define the NSGs" type: string nsgNames: description: NsgNames defines a list of the nsg names of the network @@ -284,8 +285,8 @@ spec: check is disabled on the VNIC. type: boolean subnetId: - description: SubnetId defines the ID of the subnet to use. Deprecated, - use SubnetName parameter + description: SubnetId defines the ID of the subnet to use. This + parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use for the @@ -1030,6 +1031,10 @@ spec: description: HostnameLabel defines the hostname for the VNIC's primary private IP. Used for DNS. type: string + nsgId: + description: "Deprecated, use \tNsgNames parameter to define the + NSGs" + type: string nsgNames: description: NsgNames defines a list of the nsg names of the network security groups (NSGs) to add the VNIC to. @@ -1040,6 +1045,10 @@ spec: description: SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. type: boolean + subnetId: + description: SubnetId defines the ID of the subnet to use. Deprecated, + use SubnetName parameter + type: string subnetName: description: SubnetName defines the subnet name to use for the VNIC diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml index 0a542241..bfe0ac75 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml @@ -295,8 +295,9 @@ spec: VNIC's primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to - define the NSGs" + description: "NSGId defines the ID of the NSG to use. + This parameter takes priority over NsgNames. Deprecated, + use \tNsgNames parameter to define the NSGs" type: string nsgNames: description: NsgNames defines a list of the nsg names @@ -311,7 +312,7 @@ spec: type: boolean subnetId: description: SubnetId defines the ID of the subnet to - use. Deprecated, use SubnetName parameter + use. This parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use @@ -1034,6 +1035,10 @@ spec: description: HostnameLabel defines the hostname for the VNIC's primary private IP. Used for DNS. type: string + nsgId: + description: "Deprecated, use \tNsgNames parameter to + define the NSGs" + type: string nsgNames: description: NsgNames defines a list of the nsg names of the network security groups (NSGs) to add the VNIC @@ -1045,6 +1050,10 @@ spec: description: SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. type: boolean + subnetId: + description: SubnetId defines the ID of the subnet to + use. Deprecated, use SubnetName parameter + type: string subnetName: description: SubnetName defines the subnet name to use for the VNIC From 4547125fff9301d032fd68e84d84ddff9d0f8b2e Mon Sep 17 00:00:00 2001 From: Shyam Radhakrishnan Date: Wed, 28 Jun 2023 10:49:32 +0530 Subject: [PATCH 2/2] Add Subnet Id and NSG ID to machine spec --- api/v1beta1/types.go | 1 - api/v1beta2/types.go | 5 ++--- ...astructure.cluster.x-k8s.io_ocimachinepools.yaml | 11 +++++------ ...infrastructure.cluster.x-k8s.io_ocimachines.yaml | 13 ++++++------- ...ucture.cluster.x-k8s.io_ocimachinetemplates.yaml | 11 +++++------ 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/api/v1beta1/types.go b/api/v1beta1/types.go index decf404e..2fc64915 100644 --- a/api/v1beta1/types.go +++ b/api/v1beta1/types.go @@ -44,7 +44,6 @@ type NetworkDetails struct { SubnetName string `json:"subnetName,omitempty"` // NSGId defines the ID of the NSG to use. This parameter takes priority over NsgNames. - // Deprecated, use NsgNames parameter to define the NSGs NSGId *string `json:"nsgId,omitempty"` // SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index 1ddbbf29..202280b6 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -34,8 +34,7 @@ var OCIManagedClusterSubnetRoles = []Role{PodRole, ControlPlaneEndpointRole, Wor // NetworkDetails defines the configuration options for the network type NetworkDetails struct { - // SubnetId defines the ID of the subnet to use. - // Deprecated, use SubnetName parameter + // SubnetId defines the ID of the subnet to use. This parameter takes priority over SubnetName. SubnetId *string `json:"subnetId,omitempty"` // AssignPublicIp defines whether the instance should have a public IP address @@ -47,7 +46,7 @@ type NetworkDetails struct { // SkipSourceDestCheck defines whether the source/destination check is disabled on the VNIC. SkipSourceDestCheck *bool `json:"skipSourceDestCheck,omitempty"` - // Deprecated, use NsgNames parameter to define the NSGs + // NSGId defines the ID of the NSG to use. This parameter takes priority over NsgNames. NSGId *string `json:"nsgId,omitempty"` // NsgNames defines a list of the nsg names of the network security groups (NSGs) to add the VNIC to. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml index fe5133b7..bf9e25c7 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinepools.yaml @@ -204,9 +204,8 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "NSGId defines the ID of the NSG to use. This - parameter takes priority over NsgNames. Deprecated, use - \tNsgNames parameter to define the NSGs" + description: NSGId defines the ID of the NSG to use. This + parameter takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names of the @@ -922,8 +921,8 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to define - the NSGs" + description: NSGId defines the ID of the NSG to use. This + parameter takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names of the @@ -937,7 +936,7 @@ spec: type: boolean subnetId: description: SubnetId defines the ID of the subnet to use. - Deprecated, use SubnetName parameter + This parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use for diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml index 16dcc625..474592b0 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachines.yaml @@ -270,9 +270,8 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "NSGId defines the ID of the NSG to use. This parameter - takes priority over NsgNames. Deprecated, use \tNsgNames parameter - to define the NSGs" + description: NSGId defines the ID of the NSG to use. This parameter + takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names of the network @@ -1032,8 +1031,8 @@ spec: primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to define the - NSGs" + description: NSGId defines the ID of the NSG to use. This parameter + takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names of the network @@ -1046,8 +1045,8 @@ spec: check is disabled on the VNIC. type: boolean subnetId: - description: SubnetId defines the ID of the subnet to use. Deprecated, - use SubnetName parameter + description: SubnetId defines the ID of the subnet to use. This + parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use for the diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml index bfe0ac75..a2624d16 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimachinetemplates.yaml @@ -295,9 +295,8 @@ spec: VNIC's primary private IP. Used for DNS. type: string nsgId: - description: "NSGId defines the ID of the NSG to use. - This parameter takes priority over NsgNames. Deprecated, - use \tNsgNames parameter to define the NSGs" + description: NSGId defines the ID of the NSG to use. This + parameter takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names @@ -1036,8 +1035,8 @@ spec: VNIC's primary private IP. Used for DNS. type: string nsgId: - description: "Deprecated, use \tNsgNames parameter to - define the NSGs" + description: NSGId defines the ID of the NSG to use. This + parameter takes priority over NsgNames. type: string nsgNames: description: NsgNames defines a list of the nsg names @@ -1052,7 +1051,7 @@ spec: type: boolean subnetId: description: SubnetId defines the ID of the subnet to - use. Deprecated, use SubnetName parameter + use. This parameter takes priority over SubnetName. type: string subnetName: description: SubnetName defines the subnet name to use