Skip to content

Commit

Permalink
Remove unused 1.23 and 1.24 methods from testing code (#7330)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna authored Jan 19, 2024
1 parent 50c4621 commit 8368db5
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 260 deletions.
2 changes: 1 addition & 1 deletion test/e2e/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ const (

var (
EksaPackageControllerHelmValues = []string{"sourceRegistry=public.ecr.aws/l0g8r8j6"}
KubeVersions = []v1alpha1.KubernetesVersion{v1alpha1.Kube124, v1alpha1.Kube125, v1alpha1.Kube126, v1alpha1.Kube127, v1alpha1.Kube128}
KubeVersions = []v1alpha1.KubernetesVersion{v1alpha1.Kube125, v1alpha1.Kube126, v1alpha1.Kube127, v1alpha1.Kube128}
)
36 changes: 0 additions & 36 deletions test/framework/cloudstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,6 @@ func withCloudStackKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os
}
}

// WithCloudStackRedhat123 returns a function which can be invoked to configure the Cloudstack object to be compatible with K8s 1.23.
func WithCloudStackRedhat123() CloudStackOpt {
return withCloudStackKubeVersionAndOS(anywherev1.Kube123, RedHat8, nil)
}

// WithCloudStackRedhat124 returns a function which can be invoked to configure the Cloudstack object to be compatible with K8s 1.24.
func WithCloudStackRedhat124() CloudStackOpt {
return withCloudStackKubeVersionAndOS(anywherev1.Kube124, RedHat8, nil)
}

// WithCloudStackRedhat125 returns a function which can be invoked to configure the Cloudstack object to be compatible with K8s 1.25.
func WithCloudStackRedhat125() CloudStackOpt {
return withCloudStackKubeVersionAndOS(anywherev1.Kube125, RedHat8, nil)
Expand Down Expand Up @@ -317,16 +307,6 @@ func (c *CloudStack) templateForKubeVersionAndOS(kubeVersion anywherev1.Kubernet
return api.WithCloudStackTemplateForAllMachines(template)
}

// Redhat123Template returns cloudstack filler for 1.23 RedHat.
func (c *CloudStack) Redhat123Template() api.CloudStackFiller {
return c.templateForKubeVersionAndOS(anywherev1.Kube123, RedHat8, nil)
}

// Redhat124Template returns cloudstack filler for 1.24 RedHat.
func (c *CloudStack) Redhat124Template() api.CloudStackFiller {
return c.templateForKubeVersionAndOS(anywherev1.Kube124, RedHat8, nil)
}

// Redhat125Template returns cloudstack filler for 1.25 RedHat.
func (c *CloudStack) Redhat125Template() api.CloudStackFiller {
return c.templateForKubeVersionAndOS(anywherev1.Kube125, RedHat8, nil)
Expand Down Expand Up @@ -375,18 +355,6 @@ func (c *CloudStack) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersi
)
}

// WithRedhat123 returns a cluster config filler that sets the kubernetes version of the cluster to 1.23
// as well as the right redhat template for all CloudStackMachineConfigs.
func (c *CloudStack) WithRedhat123() api.ClusterConfigFiller {
return c.WithKubeVersionAndOS(anywherev1.Kube123, RedHat8, nil)
}

// WithRedhat124 returns a cluster config filler that sets the kubernetes version of the cluster to 1.24
// as well as the right redhat template for all CloudStackMachineConfigs.
func (c *CloudStack) WithRedhat124() api.ClusterConfigFiller {
return c.WithKubeVersionAndOS(anywherev1.Kube124, RedHat8, nil)
}

// WithRedhat125 returns a cluster config filler that sets the kubernetes version of the cluster to 1.25
// as well as the right redhat template for all CloudStackMachineConfigs.
func (c *CloudStack) WithRedhat125() api.ClusterConfigFiller {
Expand Down Expand Up @@ -415,10 +383,6 @@ func (c *CloudStack) WithRedhat128() api.ClusterConfigFiller {
// version provider, as well as the right redhat template for all CloudStackMachineConfigs.
func (c *CloudStack) WithRedhatVersion(version anywherev1.KubernetesVersion) api.ClusterConfigFiller {
switch version {
case anywherev1.Kube123:
return c.WithRedhat123()
case anywherev1.Kube124:
return c.WithRedhat124()
case anywherev1.Kube125:
return c.WithRedhat125()
case anywherev1.Kube126:
Expand Down
95 changes: 0 additions & 95 deletions test/framework/nutanix.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ func withNutanixKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS
}
}

// WithUbuntu123Nutanix returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template for k8s 1.23
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu123Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube123, Ubuntu2004, nil)
}

// WithUbuntu124Nutanix returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template for k8s 1.24
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu124Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube124, Ubuntu2004, nil)
}

// WithUbuntu125Nutanix returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template for k8s 1.25
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu125Nutanix() NutanixOpt {
Expand All @@ -257,18 +245,6 @@ func WithUbuntu128Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube128, Ubuntu2004, nil)
}

// WithRedHat123Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.23
// and the "redhat" osFamily in all machine configs.
func WithRedHat123Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube123, RedHat8, nil)
}

// WithRedHat124Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.24
// and the "redhat" osFamily in all machine configs.
func WithRedHat124Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube124, RedHat8, nil)
}

// WithRedHat125Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.25
// and the "redhat" osFamily in all machine configs.
func WithRedHat125Nutanix() NutanixOpt {
Expand All @@ -293,18 +269,6 @@ func WithRedHat128Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube128, RedHat8, nil)
}

// WithRedHat9Kubernetes123Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.23
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes123Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube123, RedHat9, nil)
}

// WithRedHat9Kubernetes124Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.24
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes124Nutanix() NutanixOpt {
return withNutanixKubeVersionAndOS(anywherev1.Kube124, RedHat9, nil)
}

// WithRedHat9Kubernetes125Nutanix returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template for k8s 1.25
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes125Nutanix() NutanixOpt {
Expand Down Expand Up @@ -339,18 +303,6 @@ func withNutanixKubeVersionAndOSForUUID(kubeVersion anywherev1.KubernetesVersion
}
}

// WithUbuntu123NutanixUUID returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template UUID for k8s 1.23
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu123NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube123, Ubuntu2004, nil)
}

// WithUbuntu124NutanixUUID returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template UUID for k8s 1.24
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu124NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube124, Ubuntu2004, nil)
}

// WithUbuntu125NutanixUUID returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template UUID for k8s 1.25
// and the "ubuntu" osFamily in all machine configs.
func WithUbuntu125NutanixUUID() NutanixOpt {
Expand All @@ -375,18 +327,6 @@ func WithUbuntu128NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube128, Ubuntu2004, nil)
}

// WithRedHat123NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.23
// and the "redhat" osFamily in all machine configs.
func WithRedHat123NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube123, RedHat8, nil)
}

// WithRedHat124NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.24
// and the "redhat" osFamily in all machine configs.
func WithRedHat124NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube124, RedHat8, nil)
}

// WithRedHat125NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.25
// and the "redhat" osFamily in all machine configs.
func WithRedHat125NutanixUUID() NutanixOpt {
Expand All @@ -411,18 +351,6 @@ func WithRedHat128NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube128, RedHat8, nil)
}

// WithRedHat9Kubernetes123NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.23
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes123NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube123, RedHat9, nil)
}

// WithRedHat9Kubernetes124NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.24
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes124NutanixUUID() NutanixOpt {
return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube124, RedHat9, nil)
}

// WithRedHat9Kubernetes125NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.25
// and the "redhat" osFamily in all machine configs.
func WithRedHat9Kubernetes125NutanixUUID() NutanixOpt {
Expand Down Expand Up @@ -493,17 +421,6 @@ func (n *Nutanix) templateForKubeVersionAndOS(kubeVersion anywherev1.KubernetesV
return api.WithNutanixMachineTemplateImageName(template)
}

// Ubuntu123Template returns a Nutanix filler for 1.23 Ubuntu.
func (n *Nutanix) Ubuntu123Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube123, Ubuntu2004, nil)
}

// Ubuntu124Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) Ubuntu124Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube124, Ubuntu2004, nil)
}

// Ubuntu125Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) Ubuntu125Template() api.NutanixFiller {
Expand All @@ -528,12 +445,6 @@ func (n *Nutanix) Ubuntu128Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube128, Ubuntu2004, nil)
}

// RedHat124Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) RedHat124Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube124, RedHat8, nil)
}

// RedHat125Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) RedHat125Template() api.NutanixFiller {
Expand All @@ -558,12 +469,6 @@ func (n *Nutanix) RedHat128Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube128, RedHat8, nil)
}

// RedHat9Kubernetes124Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) RedHat9Kubernetes124Template() api.NutanixFiller {
return n.templateForKubeVersionAndOS(anywherev1.Kube124, RedHat9, nil)
}

// RedHat9Kubernetes125Template returns NutanixFiller by reading the env var and setting machine config's
// image name parameter in the spec.
func (n *Nutanix) RedHat9Kubernetes125Template() api.NutanixFiller {
Expand Down
50 changes: 0 additions & 50 deletions test/framework/snow.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,24 +211,6 @@ func (s *Snow) WithProviderUpgrade(fillers ...api.SnowFiller) ClusterE2ETestOpt
}
}

// WithBottlerocket123 returns a cluster config filler that sets the kubernetes version of the cluster to 1.23
// as well as the right devices and osFamily for all SnowMachineConfigs. It also sets any
// necessary machine config default required for BR, like the container volume size. If the env var is set, this will
// also set the AMI ID. Otherwise, it will leave it empty and let CAPAS select one.
func (s *Snow) WithBottlerocket123() api.ClusterConfigFiller {
s.t.Helper()
return s.withBottlerocketForKubeVersion(anywherev1.Kube123)
}

// WithBottlerocket124 returns a cluster config filler that sets the kubernetes version of the cluster to 1.24
// as well as the right devices and osFamily for all SnowMachineConfigs. It also sets any
// necessary machine config default required for BR, like the container volume size. If the env var is set, this will
// also set the AMI ID. Otherwise, it will leave it empty and let CAPAS select one.
func (s *Snow) WithBottlerocket124() api.ClusterConfigFiller {
s.t.Helper()
return s.withBottlerocketForKubeVersion(anywherev1.Kube124)
}

// WithBottlerocket125 returns a cluster config filler that sets the kubernetes version of the cluster to 1.25
// as well as the right devices and osFamily for all SnowMachineConfigs. It also sets any
// necessary machine config default required for BR, like the container volume size. If the env var is set, this will
Expand Down Expand Up @@ -265,22 +247,6 @@ func (s *Snow) WithBottlerocket128() api.ClusterConfigFiller {
return s.withBottlerocketForKubeVersion(anywherev1.Kube128)
}

// WithBottlerocketStaticIP123 returns a cluster config filler that sets the kubernetes version of the cluster to 1.23
// as well as the right devices, osFamily and static ip config for all SnowMachineConfigs. Comparing to WithBottlerocket123,
// this method also adds a snow ip pool to support static ip configuration.
func (s *Snow) WithBottlerocketStaticIP123() api.ClusterConfigFiller {
s.t.Helper()
return s.withBottlerocketStaticIPForKubeVersion(anywherev1.Kube123)
}

// WithBottlerocketStaticIP124 returns a cluster config filler that sets the kubernetes version of the cluster to 1.24
// as well as the right devices, osFamily and static ip config for all SnowMachineConfigs. Comparing to WithBottlerocket124,
// this method also adds a snow ip pool to support static ip configuration.
func (s *Snow) WithBottlerocketStaticIP124() api.ClusterConfigFiller {
s.t.Helper()
return s.withBottlerocketStaticIPForKubeVersion(anywherev1.Kube124)
}

// WithBottlerocketStaticIP125 returns a cluster config filler that sets the kubernetes version of the cluster to 1.25
// as well as the right devices, osFamily and static ip config for all SnowMachineConfigs. Comparing to WithBottlerocket125,
// this method also adds a snow ip pool to support static ip configuration.
Expand Down Expand Up @@ -313,22 +279,6 @@ func (s *Snow) WithBottlerocketStaticIP128() api.ClusterConfigFiller {
return s.withBottlerocketStaticIPForKubeVersion(anywherev1.Kube128)
}

// WithUbuntu123 returns a cluster config filler that sets the kubernetes version of the cluster to 1.23
// as well as the right devices and osFamily for all SnowMachineConfigs. If the env var is set, this will
// also set the AMI ID. Otherwise, it will leave it empty and let CAPAS select one.
func (s *Snow) WithUbuntu123() api.ClusterConfigFiller {
s.t.Helper()
return s.WithKubeVersionAndOS(anywherev1.Kube123, Ubuntu2004, nil)
}

// WithUbuntu124 returns a cluster config filler that sets the kubernetes version of the cluster to 1.24
// as well as the right devices and osFamily for all SnowMachineConfigs. If the env var is set, this will
// also set the AMI ID. Otherwise, it will leave it empty and let CAPAS select one.
func (s *Snow) WithUbuntu124() api.ClusterConfigFiller {
s.t.Helper()
return s.WithKubeVersionAndOS(anywherev1.Kube124, Ubuntu2004, nil)
}

// WithUbuntu125 returns a cluster config filler that sets the kubernetes version of the cluster to 1.25
// as well as the right devices and osFamily for all SnowMachineConfigs. If the env var is set, this will
// also set the AMI ID. Otherwise, it will leave it empty and let CAPAS select one.
Expand Down
15 changes: 0 additions & 15 deletions test/framework/tinkerbell.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,6 @@ func withKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, machi
}
}

// WithUbuntu124Tinkerbell tink test with ubuntu 1.24.
func WithUbuntu124Tinkerbell() TinkerbellOpt {
return withKubeVersionAndOS(anywherev1.Kube124, Ubuntu2004, "", nil)
}

// WithUbuntu125Tinkerbell tink test with ubuntu 1.25.
func WithUbuntu125Tinkerbell() TinkerbellOpt {
return withKubeVersionAndOS(anywherev1.Kube125, Ubuntu2004, "", nil)
Expand All @@ -231,11 +226,6 @@ func WithUbuntu128Tinkerbell() TinkerbellOpt {
return withKubeVersionAndOS(anywherev1.Kube128, Ubuntu2004, "", nil)
}

// WithRedHat124Tinkerbell tink test with redhat 1.24.
func WithRedHat124Tinkerbell() TinkerbellOpt {
return withKubeVersionAndOS(anywherev1.Kube124, RedHat8, "", nil)
}

// WithRedHat125Tinkerbell tink test with redhat 1.25.
func WithRedHat125Tinkerbell() TinkerbellOpt {
return withKubeVersionAndOS(anywherev1.Kube125, RedHat8, "", nil)
Expand Down Expand Up @@ -313,11 +303,6 @@ func imageForKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, operatin
return tinkerbellFiller
}

// Ubuntu124Image represents an Ubuntu raw image corresponding to Kubernetes 1.24.
func Ubuntu124Image() api.TinkerbellFiller {
return imageForKubeVersionAndOS(anywherev1.Kube124, Ubuntu2004, "")
}

// Ubuntu125Image represents an Ubuntu raw image corresponding to Kubernetes 1.25.
func Ubuntu125Image() api.TinkerbellFiller {
return imageForKubeVersionAndOS(anywherev1.Kube125, Ubuntu2004, "")
Expand Down
Loading

0 comments on commit 8368db5

Please sign in to comment.