diff --git a/api/v1alpha5/conversion.go b/api/v1alpha5/conversion.go index 95177baa3e..5fefbc7136 100644 --- a/api/v1alpha5/conversion.go +++ b/api/v1alpha5/conversion.go @@ -624,3 +624,7 @@ func Convert_v1alpha5_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security return nil } + +func Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s conversion.Scope) error { + return autoConvert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) +} diff --git a/api/v1alpha5/zz_generated.conversion.go b/api/v1alpha5/zz_generated.conversion.go index 8ec8034142..bdf6402b6d 100644 --- a/api/v1alpha5/zz_generated.conversion.go +++ b/api/v1alpha5/zz_generated.conversion.go @@ -149,11 +149,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1alpha8.OpenStackIdentityReference)(nil), (*OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha5_OpenStackIdentityReference(a.(*v1alpha8.OpenStackIdentityReference), b.(*OpenStackIdentityReference), scope) }); err != nil { @@ -299,6 +294,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*OpenStackMachineSpec)(nil), (*v1alpha8.OpenStackMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha5_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec(a.(*OpenStackMachineSpec), b.(*v1alpha8.OpenStackMachineSpec), scope) }); err != nil { @@ -685,7 +685,15 @@ func autoConvert_v1alpha5_OpenStackClusterSpec_To_v1alpha8_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -733,7 +741,15 @@ func autoConvert_v1alpha8_OpenStackClusterSpec_To_v1alpha5_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha5_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -980,18 +996,12 @@ func Convert_v1alpha8_OpenStackClusterTemplateSpec_To_v1alpha5_OpenStackClusterT } func autoConvert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind + // WARNING: in.Kind requires manual conversion: does not exist in peer-type out.Name = in.Name return nil } -// Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference is an autogenerated conversion function. -func Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - return autoConvert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) -} - func autoConvert_v1alpha8_OpenStackIdentityReference_To_v1alpha5_OpenStackIdentityReference(in *v1alpha8.OpenStackIdentityReference, out *OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind out.Name = in.Name return nil } @@ -1114,7 +1124,15 @@ func autoConvert_v1alpha5_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec( out.ConfigDrive = (*bool)(unsafe.Pointer(in.ConfigDrive)) out.RootVolume = (*v1alpha8.RootVolume)(unsafe.Pointer(in.RootVolume)) // WARNING: in.ServerGroupID requires manual conversion: does not exist in peer-type - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha5_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -1154,7 +1172,15 @@ func autoConvert_v1alpha8_OpenStackMachineSpec_To_v1alpha5_OpenStackMachineSpec( out.RootVolume = (*RootVolume)(unsafe.Pointer(in.RootVolume)) // WARNING: in.AdditionalBlockDevices requires manual conversion: does not exist in peer-type // WARNING: in.ServerGroup requires manual conversion: does not exist in peer-type - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha5_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } diff --git a/api/v1alpha6/conversion.go b/api/v1alpha6/conversion.go index 5068c87b07..21e6e4f325 100644 --- a/api/v1alpha6/conversion.go +++ b/api/v1alpha6/conversion.go @@ -73,6 +73,9 @@ func restorev1alpha6MachineSpec(previous *OpenStackMachineSpec, dst *OpenStackMa dst.ServerMetadata[k] = v } } + + // Conversion to v1alpha8 removes the Kind fild + dst.IdentityRef = previous.IdentityRef } func restorev1alpha6ClusterStatus(previous *OpenStackClusterStatus, dst *OpenStackClusterStatus) { @@ -162,6 +165,9 @@ func restorev1alpha6ClusterSpec(previous *OpenStackClusterSpec, dst *OpenStackCl if previous.AllowAllInClusterTraffic && !previous.ManagedSecurityGroups { dst.AllowAllInClusterTraffic = true } + + // Conversion to v1alpha8 removes the Kind field + dst.IdentityRef = previous.IdentityRef } var _ ctrlconversion.Convertible = &OpenStackCluster{} @@ -988,3 +994,7 @@ func Convert_v1alpha6_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security return nil } + +func Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s apiconversion.Scope) error { + return autoConvert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) +} diff --git a/api/v1alpha6/zz_generated.conversion.go b/api/v1alpha6/zz_generated.conversion.go index 2bbcd48d10..a9d397034d 100644 --- a/api/v1alpha6/zz_generated.conversion.go +++ b/api/v1alpha6/zz_generated.conversion.go @@ -159,11 +159,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1alpha8.OpenStackIdentityReference)(nil), (*OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha6_OpenStackIdentityReference(a.(*v1alpha8.OpenStackIdentityReference), b.(*OpenStackIdentityReference), scope) }); err != nil { @@ -319,6 +314,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*OpenStackMachineSpec)(nil), (*v1alpha8.OpenStackMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha6_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec(a.(*OpenStackMachineSpec), b.(*v1alpha8.OpenStackMachineSpec), scope) }); err != nil { @@ -708,7 +708,15 @@ func autoConvert_v1alpha6_OpenStackClusterSpec_To_v1alpha8_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -756,7 +764,15 @@ func autoConvert_v1alpha8_OpenStackClusterSpec_To_v1alpha6_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha6_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -1003,18 +1019,12 @@ func Convert_v1alpha8_OpenStackClusterTemplateSpec_To_v1alpha6_OpenStackClusterT } func autoConvert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind + // WARNING: in.Kind requires manual conversion: does not exist in peer-type out.Name = in.Name return nil } -// Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference is an autogenerated conversion function. -func Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - return autoConvert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) -} - func autoConvert_v1alpha8_OpenStackIdentityReference_To_v1alpha6_OpenStackIdentityReference(in *v1alpha8.OpenStackIdentityReference, out *OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind out.Name = in.Name return nil } @@ -1137,7 +1147,15 @@ func autoConvert_v1alpha6_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec( out.ConfigDrive = (*bool)(unsafe.Pointer(in.ConfigDrive)) out.RootVolume = (*v1alpha8.RootVolume)(unsafe.Pointer(in.RootVolume)) // WARNING: in.ServerGroupID requires manual conversion: does not exist in peer-type - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha6_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -1177,7 +1195,15 @@ func autoConvert_v1alpha8_OpenStackMachineSpec_To_v1alpha6_OpenStackMachineSpec( out.RootVolume = (*RootVolume)(unsafe.Pointer(in.RootVolume)) // WARNING: in.AdditionalBlockDevices requires manual conversion: does not exist in peer-type // WARNING: in.ServerGroup requires manual conversion: does not exist in peer-type - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha6_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } diff --git a/api/v1alpha7/conversion.go b/api/v1alpha7/conversion.go index 2183d37386..cefd794c0b 100644 --- a/api/v1alpha7/conversion.go +++ b/api/v1alpha7/conversion.go @@ -180,6 +180,9 @@ func restorev1alpha7MachineSpec(previous *OpenStackMachineSpec, dst *OpenStackMa dst.ServerMetadata[k] = v } } + + // Conversion to v1alpha8 removes the Kind field + dst.IdentityRef = previous.IdentityRef } func restorev1alpha8MachineSpec(previous *infrav1.OpenStackMachineSpec, dst *infrav1.OpenStackMachineSpec) { @@ -210,6 +213,9 @@ func restorev1alpha7ClusterSpec(previous *OpenStackClusterSpec, dst *OpenStackCl if previous.AllowAllInClusterTraffic && !previous.ManagedSecurityGroups { dst.AllowAllInClusterTraffic = true } + + // Conversion to v1alpha8 removes the Kind field + dst.IdentityRef = previous.IdentityRef } func restorev1alpha8ClusterSpec(previous *infrav1.OpenStackClusterSpec, dst *infrav1.OpenStackClusterSpec) { @@ -678,3 +684,7 @@ func Convert_v1alpha7_SecurityGroup_To_v1alpha8_SecurityGroupStatus(in *Security return nil } + +func Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *infrav1.OpenStackIdentityReference, s apiconversion.Scope) error { + return autoConvert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) +} diff --git a/api/v1alpha7/zz_generated.conversion.go b/api/v1alpha7/zz_generated.conversion.go index c29aaf334f..fa7abe3520 100644 --- a/api/v1alpha7/zz_generated.conversion.go +++ b/api/v1alpha7/zz_generated.conversion.go @@ -234,11 +234,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1alpha8.OpenStackIdentityReference)(nil), (*OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha7_OpenStackIdentityReference(a.(*v1alpha8.OpenStackIdentityReference), b.(*OpenStackIdentityReference), scope) }); err != nil { @@ -399,6 +394,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*OpenStackIdentityReference)(nil), (*v1alpha8.OpenStackIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(a.(*OpenStackIdentityReference), b.(*v1alpha8.OpenStackIdentityReference), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*OpenStackMachineSpec)(nil), (*v1alpha8.OpenStackMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha7_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec(a.(*OpenStackMachineSpec), b.(*v1alpha8.OpenStackMachineSpec), scope) }); err != nil { @@ -900,7 +900,15 @@ func autoConvert_v1alpha7_OpenStackClusterSpec_To_v1alpha8_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -938,7 +946,15 @@ func autoConvert_v1alpha8_OpenStackClusterSpec_To_v1alpha7_OpenStackClusterSpec( } else { out.Bastion = nil } - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha7_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -1165,18 +1181,12 @@ func Convert_v1alpha8_OpenStackClusterTemplateSpec_To_v1alpha7_OpenStackClusterT } func autoConvert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind + // WARNING: in.Kind requires manual conversion: does not exist in peer-type out.Name = in.Name return nil } -// Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference is an autogenerated conversion function. -func Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in *OpenStackIdentityReference, out *v1alpha8.OpenStackIdentityReference, s conversion.Scope) error { - return autoConvert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(in, out, s) -} - func autoConvert_v1alpha8_OpenStackIdentityReference_To_v1alpha7_OpenStackIdentityReference(in *v1alpha8.OpenStackIdentityReference, out *OpenStackIdentityReference, s conversion.Scope) error { - out.Kind = in.Kind out.Name = in.Name return nil } @@ -1278,7 +1288,15 @@ func autoConvert_v1alpha7_OpenStackMachineSpec_To_v1alpha8_OpenStackMachineSpec( out.RootVolume = (*v1alpha8.RootVolume)(unsafe.Pointer(in.RootVolume)) out.AdditionalBlockDevices = *(*[]v1alpha8.AdditionalBlockDevice)(unsafe.Pointer(&in.AdditionalBlockDevices)) // WARNING: in.ServerGroupID requires manual conversion: does not exist in peer-type - out.IdentityRef = (*v1alpha8.OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(v1alpha8.OpenStackIdentityReference) + if err := Convert_v1alpha7_OpenStackIdentityReference_To_v1alpha8_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } @@ -1298,7 +1316,15 @@ func autoConvert_v1alpha8_OpenStackMachineSpec_To_v1alpha7_OpenStackMachineSpec( out.RootVolume = (*RootVolume)(unsafe.Pointer(in.RootVolume)) out.AdditionalBlockDevices = *(*[]AdditionalBlockDevice)(unsafe.Pointer(&in.AdditionalBlockDevices)) // WARNING: in.ServerGroup requires manual conversion: does not exist in peer-type - out.IdentityRef = (*OpenStackIdentityReference)(unsafe.Pointer(in.IdentityRef)) + if in.IdentityRef != nil { + in, out := &in.IdentityRef, &out.IdentityRef + *out = new(OpenStackIdentityReference) + if err := Convert_v1alpha8_OpenStackIdentityReference_To_v1alpha7_OpenStackIdentityReference(*in, *out, s); err != nil { + return err + } + } else { + out.IdentityRef = nil + } return nil } diff --git a/api/v1alpha8/identity_types.go b/api/v1alpha8/identity_types.go index b77700c2df..d9bf1f4f92 100644 --- a/api/v1alpha8/identity_types.go +++ b/api/v1alpha8/identity_types.go @@ -16,16 +16,9 @@ limitations under the License. package v1alpha8 -const defaultIdentityRefKind = "Secret" - // OpenStackIdentityReference is a reference to an infrastructure // provider identity to be used to provision cluster resources. type OpenStackIdentityReference struct { - // Kind of the identity. Must be supported by the infrastructure - // provider and may be either cluster or namespace-scoped. - // +kubebuilder:validation:MinLength=1 - Kind string `json:"kind"` - // Name of the infrastructure identity to be used. // Must be either a cluster-scoped resource, or namespaced-scoped // resource the same namespace as the resource(s) being provisioned. diff --git a/api/v1alpha8/openstackcluster_webhook.go b/api/v1alpha8/openstackcluster_webhook.go index 78eb4a21b5..b9e148f589 100644 --- a/api/v1alpha8/openstackcluster_webhook.go +++ b/api/v1alpha8/openstackcluster_webhook.go @@ -50,19 +50,12 @@ var ( // Default satisfies the defaulting webhook interface. func (r *OpenStackCluster) Default() { - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind == "" { - r.Spec.IdentityRef.Kind = defaultIdentityRefKind - } } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenStackCluster) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind != defaultIdentityRefKind { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "identityRef", "kind"), "must be a Secret")) - } - if r.Spec.ManagedSecurityGroups != nil { for _, rule := range r.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules { if rule.RemoteManagedGroups != nil && (rule.RemoteGroupID != nil || rule.RemoteIPPrefix != nil) { @@ -88,13 +81,6 @@ func (r *OpenStackCluster) ValidateUpdate(oldRaw runtime.Object) (admission.Warn return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an OpenStackCluster but got a %T", oldRaw)) } - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind != defaultIdentityRefKind { - allErrs = append(allErrs, - field.Invalid(field.NewPath("spec", "identityRef", "kind"), - r.Spec.IdentityRef, "must be a Secret"), - ) - } - // Allow changes to Spec.IdentityRef.Name. if old.Spec.IdentityRef != nil && r.Spec.IdentityRef != nil { old.Spec.IdentityRef.Name = "" diff --git a/api/v1alpha8/openstackcluster_webhook_test.go b/api/v1alpha8/openstackcluster_webhook_test.go index 3985e76605..40bfa731f0 100644 --- a/api/v1alpha8/openstackcluster_webhook_test.go +++ b/api/v1alpha8/openstackcluster_webhook_test.go @@ -32,35 +32,12 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { newTemplate *OpenStackCluster wantErr bool }{ - { - name: "OpenStackCluster.Spec.IdentityRef.Kind must always be Secret", - oldTemplate: &OpenStackCluster{ - Spec: OpenStackClusterSpec{ - CloudName: "foobar", - IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", - Name: "foobar", - }, - }, - }, - newTemplate: &OpenStackCluster{ - Spec: OpenStackClusterSpec{ - CloudName: "foobar", - IdentityRef: &OpenStackIdentityReference{ - Kind: "foobar", - Name: "foobar", - }, - }, - }, - wantErr: true, - }, { name: "Changing OpenStackCluster.Spec.IdentityRef.Name is allowed", oldTemplate: &OpenStackCluster{ Spec: OpenStackClusterSpec{ CloudName: "foobar", IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", Name: "foobar", }, }, @@ -69,7 +46,6 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { Spec: OpenStackClusterSpec{ CloudName: "foobar", IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", Name: "foobarbaz", }, }, @@ -87,7 +63,6 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { Spec: OpenStackClusterSpec{ CloudName: "foobar", IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", Name: "foobar", }, }, @@ -100,7 +75,6 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) { Spec: OpenStackClusterSpec{ CloudName: "foobar", IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", Name: "foobar", }, }, @@ -462,26 +436,12 @@ func TestOpenStackCluster_ValidateCreate(t *testing.T) { Spec: OpenStackClusterSpec{ CloudName: "foobar", IdentityRef: &OpenStackIdentityReference{ - Kind: "Secret", Name: "foobar", }, }, }, wantErr: false, }, - { - name: "OpenStackCluster.Spec.IdentityRef with faulty spec on create", - template: &OpenStackCluster{ - Spec: OpenStackClusterSpec{ - CloudName: "foobar", - IdentityRef: &OpenStackIdentityReference{ - Kind: "foobar", - Name: "foobar", - }, - }, - }, - wantErr: true, - }, { name: "OpenStackCluster.Spec.ManagedSecurityGroups.AllNodesSecurityGroupRules with correct spec on create", template: &OpenStackCluster{ diff --git a/api/v1alpha8/openstackclustertemplate_webhook.go b/api/v1alpha8/openstackclustertemplate_webhook.go index 5cfbc6b92d..03aa2b1dff 100644 --- a/api/v1alpha8/openstackclustertemplate_webhook.go +++ b/api/v1alpha8/openstackclustertemplate_webhook.go @@ -46,19 +46,12 @@ var ( // Default implements webhook.Defaulter so a webhook will be registered for the type. func (r *OpenStackClusterTemplate) Default() { - if r.Spec.Template.Spec.IdentityRef != nil && r.Spec.Template.Spec.IdentityRef.Kind == "" { - r.Spec.Template.Spec.IdentityRef.Kind = defaultIdentityRefKind - } } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenStackClusterTemplate) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList - if r.Spec.Template.Spec.IdentityRef != nil && r.Spec.Template.Spec.IdentityRef.Kind != defaultIdentityRefKind { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "template", "spec", "identityRef", "kind"), "must be a Secret")) - } - return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs) } diff --git a/api/v1alpha8/openstackmachine_webhook.go b/api/v1alpha8/openstackmachine_webhook.go index b5ddbaf0e3..8f5e1ee1f3 100644 --- a/api/v1alpha8/openstackmachine_webhook.go +++ b/api/v1alpha8/openstackmachine_webhook.go @@ -49,19 +49,12 @@ var ( // Default satisfies the defaulting webhook interface. func (r *OpenStackMachine) Default() { - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind == "" { - r.Spec.IdentityRef.Kind = defaultIdentityRefKind - } } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenStackMachine) ValidateCreate() (admission.Warnings, error) { var allErrs field.ErrorList - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind != defaultIdentityRefKind { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "identityRef", "kind"), "must be a Secret")) - } - if r.Spec.RootVolume != nil && r.Spec.AdditionalBlockDevices != nil { for _, device := range r.Spec.AdditionalBlockDevices { if device.Name == "root" { @@ -90,10 +83,6 @@ func (r *OpenStackMachine) ValidateUpdate(old runtime.Object) (admission.Warning var allErrs field.ErrorList - if r.Spec.IdentityRef != nil && r.Spec.IdentityRef.Kind != defaultIdentityRefKind { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "identityRef", "kind"), "must be a Secret")) - } - newOpenStackMachineSpec := newOpenStackMachine["spec"].(map[string]interface{}) oldOpenStackMachineSpec := oldOpenStackMachine["spec"].(map[string]interface{}) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml index aa96ad27ea..bdf1340bbe 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml @@ -4990,12 +4990,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -5003,7 +4997,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object image: @@ -5435,12 +5428,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -5448,7 +5435,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object managedSecurityGroups: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml index cb48bc42f4..5624a26977 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml @@ -2415,12 +2415,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -2428,7 +2422,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object image: @@ -2869,12 +2862,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -2882,7 +2869,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object managedSecurityGroups: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml index 67da66b7ea..56790cde7a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml @@ -1791,12 +1791,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -1804,7 +1798,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object image: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml index c96a204003..95d1c52ecf 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml @@ -1465,12 +1465,6 @@ spec: description: IdentityRef is a reference to a identity to be used when reconciling this cluster properties: - kind: - description: |- - Kind of the identity. Must be supported by the infrastructure - provider and may be either cluster or namespace-scoped. - minLength: 1 - type: string name: description: |- Name of the infrastructure identity to be used. @@ -1478,7 +1472,6 @@ spec: resource the same namespace as the resource(s) being provisioned. type: string required: - - kind - name type: object image: diff --git a/docs/book/src/topics/crd-changes/v1alpha7-to-v1alpha8.md b/docs/book/src/topics/crd-changes/v1alpha7-to-v1alpha8.md index a5f4c3121a..8b929c1ea2 100644 --- a/docs/book/src/topics/crd-changes/v1alpha7-to-v1alpha8.md +++ b/docs/book/src/topics/crd-changes/v1alpha7-to-v1alpha8.md @@ -6,8 +6,10 @@ - [Migration](#migration) - [API Changes](#api-changes) - [`OpenStackMachine`](#openstackmachine) - - [⚠️ Change to `serverGroupID`](#️-change-to-servergroupid) + - [Removal of machine identityRef.kind](#removal-of-machine-identityrefkind) + - [Change to serverGroupID](#change-to-servergroupid) - [`OpenStackCluster`](#openstackcluster) + - [Removal of cluster identityRef.kind](#removal-of-cluster-identityrefkind) - [Change to externalNetworkID](#change-to-externalnetworkid) - [Changes to image](#change-to-image) - [Removal of imageUUID](#removal-of-imageuuid) @@ -22,6 +24,7 @@ # v1alpha7 compared to v1alpha8 > ⚠️ v1alpha8 has not been released yet. + ## Migration All users are encouraged to migrate their usage of the CAPO CRDs from older versions to `v1alpha8`. This includes yaml files and source code. As CAPO implements automatic conversions between the CRD versions, this migration can happen after installing the new CAPO release. @@ -32,7 +35,11 @@ This only documents backwards incompatible changes. Fields that were added to v1 ### `OpenStackMachine` -#### ⚠️ Change to `serverGroupID` +#### Removal of machine identityRef.kind + +The `identityRef.Kind` field has been removed. It was used to specify the kind of the identity provider to use but was actually ignored. + +#### Change to serverGroupID The field `serverGroupID` has been renamed to `serverGroup` and is now a `ServerGroupFilter` object rather than a string ID. @@ -61,8 +68,11 @@ If empty object or null is provided, Machine will not be added to any server gro ### `OpenStackCluster` -#### Change to externalNetworkID +#### Removal of cluster identityRef.kind + +The `identityRef.Kind` field has been removed. It was used to specify the kind of the identity provider to use but was actually ignored. +#### Change to externalNetworkID The field `externalNetworkID` has been renamed to `externalNetwork` and is now a `NetworkFilter` object rather than a string ID. The `NetworkFilter` object allows selection of a network by name, by ID or by tags. @@ -96,7 +106,7 @@ It is now possible for a user to specify that no external network should be used disableExternalNetwork: true ``` -#### ⚠️ Change to image +#### Change to image The field `image` is now an `ImageFilter` object rather than a string name. The `ImageFilter` object allows selection of an image by name, by ID or by tags. @@ -114,7 +124,7 @@ image: The image ID will be added to `OpenStackMachine.Status.ReferencedResources.ImageID`. If the image can't be found or filter matches multiple images, an error will be returned. -#### ⚠️ Removal of imageUUID +#### Removal of imageUUID The fild `imageUUID` has been removed in favor of the `image` field. @@ -161,7 +171,7 @@ spec: floatingIP: "1.2.3.4" ``` -#### ⚠️ Change to subnet +#### Change to subnet In v1alpha8, `Subnet` of `OpenStackCluster` is modified to `Subnets` to allow specification of two existent subnets for the dual-stack scenario. @@ -181,7 +191,7 @@ In v1alpha8, this will be automatically converted to: When subnets are not specified on `OpenStackCluster` and only the network is, the network is used to identify the subnets to use. If more than two subnets exist in the network, the user must specify which ones to use by defining the `OpenStackCluster.Spec.Subnets` field. -#### ⚠️ Change to nodeCidr and dnsNameservers +#### Change to nodeCidr and dnsNameservers In v1alpha8, `OpenStackCluster.Spec.ManagedSubnets` array field is introduced. The `NodeCIDR` and `DNSNameservers` fields of `OpenStackCluster.Spec` are moved into that structure (renaming `NodeCIDR` to `CIDR`). For example: @@ -200,7 +210,7 @@ In v1alpha8, this will be automatically converted to: Please note that currently `managedSubnets` can only hold one element. -#### ⚠️ Change to managedSecurityGroups +#### Change to managedSecurityGroups The field `managedSecurityGroups` is now a pointer to a `ManagedSecurityGroups` object rather than a boolean. @@ -252,7 +262,7 @@ managedSecurityGroups: description: "Allow BGP between control plane and workers" ``` -#### ⚠️ Calico CNI +#### Calico CNI Historically we used to create the necessary security group rules for Calico CNI to work. This is no longer the case. Now the user needs to request creation of the security group rules by using the `managedSecurityGroups.allNodesSecurityGroupRules` feature. @@ -260,6 +270,6 @@ Now the user needs to request creation of the security group rules by using the Note that when upgrading from a previous version, the Calico CNI security group rules will be added automatically to allow backwards compatibility if `allowAllInClusterTraffic` is set to false. -#### ⚠️ Change to network +#### Change to network In v1alpha8, when the `OpenStackCluster.Spec.Network` is not defined, the `Subnets` are now used to identify the `Network`. diff --git a/kustomize/v1alpha8/default/cluster-template.yaml b/kustomize/v1alpha8/default/cluster-template.yaml index c7554d7d7c..cdee2550fc 100644 --- a/kustomize/v1alpha8/default/cluster-template.yaml +++ b/kustomize/v1alpha8/default/cluster-template.yaml @@ -25,7 +25,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} identityRef: name: ${CLUSTER_NAME}-cloud-config - kind: Secret apiServerLoadBalancer: enabled: true managedSubnets: @@ -103,7 +102,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} identityRef: name: ${CLUSTER_NAME}-cloud-config - kind: Secret --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment @@ -139,7 +137,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} identityRef: name: ${CLUSTER_NAME}-cloud-config - kind: Secret flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} image: name: ${OPENSTACK_IMAGE_NAME} diff --git a/templates/cluster-template-flatcar-sysext.yaml b/templates/cluster-template-flatcar-sysext.yaml index ca02b3c639..0cdd02dc0e 100644 --- a/templates/cluster-template-flatcar-sysext.yaml +++ b/templates/cluster-template-flatcar-sysext.yaml @@ -228,7 +228,6 @@ spec: externalNetwork: id: ${OPENSTACK_EXTERNAL_NETWORK_ID} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config managedSecurityGroups: allNodesSecurityGroupRules: @@ -265,7 +264,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${FLATCAR_IMAGE_NAME} @@ -281,7 +279,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${FLATCAR_IMAGE_NAME} diff --git a/templates/cluster-template-flatcar.yaml b/templates/cluster-template-flatcar.yaml index c2cfdc6934..535a177fcd 100644 --- a/templates/cluster-template-flatcar.yaml +++ b/templates/cluster-template-flatcar.yaml @@ -152,7 +152,6 @@ spec: externalNetwork: id: ${OPENSTACK_EXTERNAL_NETWORK_ID} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config managedSecurityGroups: allNodesSecurityGroupRules: @@ -189,7 +188,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_FLATCAR_IMAGE_NAME} @@ -205,7 +203,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_FLATCAR_IMAGE_NAME} diff --git a/templates/cluster-template-without-lb.yaml b/templates/cluster-template-without-lb.yaml index 2b206b65cd..6b3e402d4f 100644 --- a/templates/cluster-template-without-lb.yaml +++ b/templates/cluster-template-without-lb.yaml @@ -109,7 +109,6 @@ spec: externalNetwork: id: ${OPENSTACK_EXTERNAL_NETWORK_ID} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config managedSecurityGroups: allNodesSecurityGroupRules: @@ -146,7 +145,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} @@ -162,7 +160,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index e2b1ff52db..f3886fc8ec 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -111,7 +111,6 @@ spec: externalNetwork: id: ${OPENSTACK_EXTERNAL_NETWORK_ID} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config managedSecurityGroups: allNodesSecurityGroupRules: @@ -148,7 +147,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} @@ -164,7 +162,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} diff --git a/templates/clusterclass-dev-test.yaml b/templates/clusterclass-dev-test.yaml index 4112633624..a73e07dd3b 100644 --- a/templates/clusterclass-dev-test.yaml +++ b/templates/clusterclass-dev-test.yaml @@ -119,7 +119,6 @@ spec: enabled: true cloudName: ${OPENSTACK_CLOUD:=capo-e2e} identityRef: - kind: Secret name: dev-test-cloud-config managedSecurityGroups: allNodesSecurityGroupRules: @@ -156,7 +155,6 @@ spec: cloudName: ${OPENSTACK_CLOUD:=capo-e2e} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR:=m1.medium} identityRef: - kind: Secret name: dev-test-cloud-config image: name: overridden-by-patch @@ -172,7 +170,6 @@ spec: cloudName: ${OPENSTACK_CLOUD:=capo-e2e} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR:=m1.small} identityRef: - kind: Secret name: dev-test-cloud-config image: name: overridden-by-patch diff --git a/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml b/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml index 339b52535a..60136e0823 100644 --- a/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml +++ b/test/e2e/data/kustomize/k8s-upgrade/upgrade-from-template.yaml @@ -9,7 +9,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME_UPGRADE_FROM} @@ -27,7 +26,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME_UPGRADE_FROM} diff --git a/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml b/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml index 6e426d14a5..b8e499e42c 100644 --- a/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml +++ b/test/e2e/data/kustomize/k8s-upgrade/upgrade-to-template.yaml @@ -16,7 +16,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} @@ -36,7 +35,6 @@ spec: cloudName: ${OPENSTACK_CLOUD} flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR} identityRef: - kind: Secret name: ${CLUSTER_NAME}-cloud-config image: name: ${OPENSTACK_IMAGE_NAME} diff --git a/test/e2e/suites/e2e/e2e_test.go b/test/e2e/suites/e2e/e2e_test.go index f4b92c9a42..3ba40942f7 100644 --- a/test/e2e/suites/e2e/e2e_test.go +++ b/test/e2e/suites/e2e/e2e_test.go @@ -785,7 +785,6 @@ func makeOpenStackMachineTemplate(namespace, clusterName, name string) *infrav1. SSHKeyName: shared.DefaultSSHKeyPairName, CloudName: e2eCtx.E2EConfig.GetVariable(shared.OpenStackCloud), IdentityRef: &infrav1.OpenStackIdentityReference{ - Kind: "Secret", Name: fmt.Sprintf("%s-cloud-config", clusterName), }, }, @@ -810,7 +809,6 @@ func makeOpenStackMachineTemplateWithPortOptions(namespace, clusterName, name st SSHKeyName: shared.DefaultSSHKeyPairName, CloudName: e2eCtx.E2EConfig.GetVariable(shared.OpenStackCloud), IdentityRef: &infrav1.OpenStackIdentityReference{ - Kind: "Secret", Name: fmt.Sprintf("%s-cloud-config", clusterName), }, Ports: *portOpts,