Skip to content

Commit

Permalink
Add Tinkerbell E2E test for Ubuntu 22.04 RTOS image
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed May 30, 2024
1 parent 5daadb2 commit 5f34092
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ env:
T_TINKERBELL_IMAGE_UBUNTU_2204_1_27: "tinkerbell_ci:image_ubuntu_2204_1_27"
T_TINKERBELL_IMAGE_UBUNTU_2204_1_28: "tinkerbell_ci:image_ubuntu_2204_1_28"
T_TINKERBELL_IMAGE_UBUNTU_2204_1_29: "tinkerbell_ci:image_ubuntu_2204_1_29"
T_TINKERBELL_IMAGE_UBUNTU_2204_1_29_RTOS: "tinkerbell_ci:image_ubuntu_2204_1_29_rtos"
T_TINKERBELL_IMAGE_UBUNTU_2204_1_30: "tinkerbell_ci:image_ubuntu_2204_1_30"
T_TINKERBELL_IMAGE_REDHAT_1_24: "tinkerbell_ci:image_redhat_1_24"
T_TINKERBELL_IMAGE_REDHAT_1_25: "tinkerbell_ci:image_redhat_1_25"
Expand Down
3 changes: 2 additions & 1 deletion internal/test/e2e/tinkerbell.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
maxHardwarePerE2ETestEnvVar = "T_TINKERBELL_MAX_HARDWARE_PER_TEST"
tinkerbellDefaultMaxHardwarePerE2ETest = 4
tinkerbellBootstrapInterfaceEnvVar = "T_TINKERBELL_BOOTSTRAP_INTERFACE"
tinkerbellCIEnvironmentEnvVar = "T_TINKERBELL_CI_ENVIRONMENT"
)

// TinkerbellTest maps each Tinkbell test with the hardware count needed for the test.
Expand Down Expand Up @@ -80,7 +81,7 @@ func (e *E2ESession) setupTinkerbellEnv(testRegex string) error {
}

e.testEnvVars[tinkerbellInventoryCsvFilePathEnvVar] = inventoryFilePath
e.testEnvVars[e2etests.TinkerbellCIEnvironment] = "true"
e.testEnvVars[tinkerbellCIEnvironmentEnvVar] = "true"

return nil
}
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/TINKERBELL_HARDWARE_COUNT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ TestTinkerbellKubernetes129UbuntuTo130Upgrade: 4
TestTinkerbellKubernetes126To127Ubuntu2204Upgrade: 4
TestTinkerbellKubernetes127To128Ubuntu2204Upgrade: 4
TestTinkerbellKubernetes128To129Ubuntu2204Upgrade: 4
TestTinkerbellKubernetes128To129Ubuntu2204RTOSUpgrade: 4
TestTinkerbellKubernetes129To130Ubuntu2204Upgrade: 4
TestTinkerbellKubernetes126Ubuntu2004To2204Upgrade: 4
TestTinkerbellKubernetes127Ubuntu2004To2204Upgrade: 4
TestTinkerbellKubernetes128Ubuntu2004To2204Upgrade: 4
TestTinkerbellKubernetes129Ubuntu2004To2204Upgrade: 4
TestTinkerbellKubernetes129Ubuntu2004To2204RTOSUpgrade: 4
TestTinkerbellKubernetes130Ubuntu2004To2204Upgrade: 4
TestTinkerbellUpgrade130MulticlusterWorkloadClusterWorkerScaleupGitFluxWithAPI: 4
TestTinkerbellUpgrade130MulticlusterWorkloadClusterCPScaleup: 6
Expand All @@ -91,6 +93,7 @@ TestTinkerbellKubernetes126Ubuntu2204SimpleFlow: 2
TestTinkerbellKubernetes127Ubuntu2204SimpleFlow: 2
TestTinkerbellKubernetes128Ubuntu2204SimpleFlow: 2
TestTinkerbellKubernetes129Ubuntu2204SimpleFlow: 2
TestTinkerbellKubernetes129Ubuntu2204RTOSSimpleFlow: 2
TestTinkerbellKubernetes130Ubuntu2204SimpleFlow: 2
TestTinkerbellKubernetes126RedHatSimpleFlow: 2
TestTinkerbellKubernetes127RedHatSimpleFlow: 2
Expand Down
53 changes: 53 additions & 0 deletions test/e2e/tinkerbell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,26 @@ func TestTinkerbellKubernetes128To129Ubuntu2204Upgrade(t *testing.T) {
)
}

func TestTinkerbellKubernetes128To129Ubuntu2204RTOSUpgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithControlPlaneHardware(2),
framework.WithWorkerHardware(2),
).WithClusterConfig(
provider.WithKubeVersionAndOS(v1alpha1.Kube128, framework.Ubuntu2204, nil),
)
runSimpleUpgradeFlowForBaremetalWithoutClusterConfigGeneration(
test,
v1alpha1.Kube129,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube129)),
provider.WithProviderUpgrade(framework.Ubuntu2204Kubernetes129RTOSImage()),
)
}

func TestTinkerbellKubernetes129To130Ubuntu2204Upgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
Expand Down Expand Up @@ -316,6 +336,26 @@ func TestTinkerbellKubernetes129Ubuntu2004To2204Upgrade(t *testing.T) {
)
}

func TestTinkerbellKubernetes129Ubuntu2004To2204RTOSUpgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithControlPlaneHardware(2),
framework.WithWorkerHardware(2),
).WithClusterConfig(
provider.WithKubeVersionAndOS(v1alpha1.Kube129, framework.Ubuntu2004, nil),
)
runSimpleUpgradeFlowForBaremetalWithoutClusterConfigGeneration(
test,
v1alpha1.Kube129,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube129)),
provider.WithProviderUpgrade(framework.Ubuntu2204Kubernetes129RTOSImage()),
)
}

func TestTinkerbellKubernetes130Ubuntu2004To2204Upgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
Expand Down Expand Up @@ -1346,6 +1386,19 @@ func TestTinkerbellKubernetes129Ubuntu2204SimpleFlow(t *testing.T) {
runTinkerbellSimpleFlowWithoutClusterConfigGeneration(test)
}

func TestTinkerbellKubernetes129Ubuntu2204RTOSSimpleFlow(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithControlPlaneHardware(1),
framework.WithWorkerHardware(1),
).WithClusterConfig(
provider.WithKubeVersionAndOS(v1alpha1.Kube129, framework.Ubuntu2204, nil, true),
)
runTinkerbellSimpleFlowWithoutClusterConfigGeneration(test)
}

func TestTinkerbellKubernetes130Ubuntu2204SimpleFlow(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
Expand Down
2 changes: 1 addition & 1 deletion test/framework/cloudstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func (c *CloudStack) ClusterStateValidations() []clusterf.StateValidation {

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version and the right template for all
// cloudstack machine configs.
func (c *CloudStack) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (c *CloudStack) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease, _ ...bool) api.ClusterConfigFiller {
return api.JoinClusterConfigFillers(
api.ClusterToConfigFiller(api.WithKubernetesVersion(kubeVersion)),
api.CloudStackToConfigFiller(
Expand Down
4 changes: 2 additions & 2 deletions test/framework/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func NewClusterE2ETest(t T, provider Provider, opts ...ClusterE2ETestOpt) *Clust
e.T.Cleanup(func() {
e.cleanupResources()

tinkerbellCIEnvironment := os.Getenv(TinkerbellCIEnvironment)
tinkerbellCIEnvironment := os.Getenv(tinkerbellCIEnvironmentEnvVar)
if e.Provider.Name() == tinkerbellProviderName && tinkerbellCIEnvironment == "true" {
e.CleanupDockerEnvironment()
}
Expand Down Expand Up @@ -344,7 +344,7 @@ type Provider interface {
CleanupResources(clusterName string) error
UpdateKubeConfig(content *[]byte, clusterName string) error
ClusterStateValidations() []clusterf.StateValidation
WithKubeVersionAndOS(kubeVersion v1alpha1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller
WithKubeVersionAndOS(kubeVersion v1alpha1.KubernetesVersion, os OS, release *releasev1.EksARelease, rtos ...bool) api.ClusterConfigFiller
WithNewWorkerNodeGroup(name string, workerNodeGroup *WorkerNodeGroup) api.ClusterConfigFiller
}

Expand Down
2 changes: 1 addition & 1 deletion test/framework/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (d *Docker) ClusterStateValidations() []clusterf.StateValidation {
}

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version.
func (d *Docker) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (d *Docker) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, _ OS, _ *releasev1.EksARelease, _ ...bool) api.ClusterConfigFiller {
return api.JoinClusterConfigFillers(
api.ClusterToConfigFiller(api.WithKubernetesVersion(kubeVersion)),
)
Expand Down
2 changes: 1 addition & 1 deletion test/framework/nutanix.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (n *Nutanix) WithProviderUpgrade(fillers ...api.NutanixFiller) ClusterE2ETe

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version and the right template for all
// nutanix machine configs.
func (n *Nutanix) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (n *Nutanix) WithKubeVersionAndOS(_ anywherev1.KubernetesVersion, _ OS, _ *releasev1.EksARelease, _ ...bool) api.ClusterConfigFiller {
// TODO: Update tests to use this
panic("Not implemented for Nutanix yet")
}
Expand Down
2 changes: 1 addition & 1 deletion test/framework/snow.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (s *Snow) withBottlerocketStaticIPForKubeVersion(kubeVersion anywherev1.Kub

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version and the correct AMI ID
// and devices for the Snow machine configs.
func (s *Snow) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (s *Snow) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, _ *releasev1.EksARelease, _ ...bool) api.ClusterConfigFiller {
envar := fmt.Sprintf("T_SNOW_AMIID_%s_%s", strings.ToUpper(strings.ReplaceAll(string(os), "-", "_")), strings.ReplaceAll(string(kubeVersion), ".", "_"))

return api.JoinClusterConfigFillers(
Expand Down
76 changes: 43 additions & 33 deletions test/framework/tinkerbell.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,33 @@ import (
)

const (
tinkerbellProviderName = "tinkerbell"
tinkerbellBootstrapIPEnvVar = "T_TINKERBELL_BOOTSTRAP_IP"
tinkerbellControlPlaneNetworkCidrEnvVar = "T_TINKERBELL_CP_NETWORK_CIDR"
tinkerbellImageUbuntu125EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_25"
tinkerbellImageUbuntu126EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_26"
tinkerbellImageUbuntu127EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_27"
tinkerbellImageUbuntu128EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_28"
tinkerbellImageUbuntu129EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_29"
tinkerbellImageUbuntu130EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_30"
tinkerbellImageUbuntu2204Kubernetes125EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_25"
tinkerbellImageUbuntu2204Kubernetes126EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_26"
tinkerbellImageUbuntu2204Kubernetes127EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_27"
tinkerbellImageUbuntu2204Kubernetes128EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_28"
tinkerbellImageUbuntu2204Kubernetes129EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_29"
tinkerbellImageUbuntu2204Kubernetes130EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_30"
tinkerbellImageRedHat125EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_25"
tinkerbellImageRedHat126EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_26"
tinkerbellImageRedHat127EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_27"
tinkerbellImageRedHat128EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_28"
tinkerbellImageRedHat129EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_29"
tinkerbellImageRedHat130EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_30"
tinkerbellInventoryCsvFilePathEnvVar = "T_TINKERBELL_INVENTORY_CSV"
tinkerbellSSHAuthorizedKey = "T_TINKERBELL_SSH_AUTHORIZED_KEY"
TinkerbellCIEnvironment = "T_TINKERBELL_CI_ENVIRONMENT"
controlPlaneIdentifier = "cp"
workerIdentifier = "worker"
tinkerbellProviderName = "tinkerbell"
tinkerbellBootstrapIPEnvVar = "T_TINKERBELL_BOOTSTRAP_IP"
tinkerbellControlPlaneNetworkCidrEnvVar = "T_TINKERBELL_CP_NETWORK_CIDR"
tinkerbellImageUbuntu125EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_25"
tinkerbellImageUbuntu126EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_26"
tinkerbellImageUbuntu127EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_27"
tinkerbellImageUbuntu128EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_28"
tinkerbellImageUbuntu129EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_29"
tinkerbellImageUbuntu130EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_1_30"
tinkerbellImageUbuntu2204Kubernetes125EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_25"
tinkerbellImageUbuntu2204Kubernetes126EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_26"
tinkerbellImageUbuntu2204Kubernetes127EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_27"
tinkerbellImageUbuntu2204Kubernetes128EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_28"
tinkerbellImageUbuntu2204Kubernetes129EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_29"
tinkerbellImageUbuntu2204Kubernetes129RTOSEnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_29_RTOS"
tinkerbellImageUbuntu2204Kubernetes130EnvVar = "T_TINKERBELL_IMAGE_UBUNTU_2204_1_30"
tinkerbellImageRedHat125EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_25"
tinkerbellImageRedHat126EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_26"
tinkerbellImageRedHat127EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_27"
tinkerbellImageRedHat128EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_28"
tinkerbellImageRedHat129EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_29"
tinkerbellImageRedHat130EnvVar = "T_TINKERBELL_IMAGE_REDHAT_1_30"
tinkerbellInventoryCsvFilePathEnvVar = "T_TINKERBELL_INVENTORY_CSV"
tinkerbellSSHAuthorizedKey = "T_TINKERBELL_SSH_AUTHORIZED_KEY"
tinkerbellCIEnvironmentEnvVar = "T_TINKERBELL_CI_ENVIRONMENT"
controlPlaneIdentifier = "cp"
workerIdentifier = "worker"
)

var requiredTinkerbellEnvVars = []string{
Expand All @@ -55,6 +56,7 @@ var requiredTinkerbellEnvVars = []string{
tinkerbellImageUbuntu2204Kubernetes127EnvVar,
tinkerbellImageUbuntu2204Kubernetes128EnvVar,
tinkerbellImageUbuntu2204Kubernetes129EnvVar,
tinkerbellImageUbuntu2204Kubernetes129RTOSEnvVar,
tinkerbellImageUbuntu2204Kubernetes130EnvVar,
tinkerbellImageRedHat125EnvVar,
tinkerbellImageRedHat126EnvVar,
Expand Down Expand Up @@ -154,11 +156,11 @@ func (t *Tinkerbell) CleanupResources(_ string) error {

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version and the right image for all
// tinkerbell machine configs.
func (t *Tinkerbell) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (t *Tinkerbell) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, _ *releasev1.EksARelease, rtos ...bool) api.ClusterConfigFiller {
return api.JoinClusterConfigFillers(
api.ClusterToConfigFiller(api.WithKubernetesVersion(kubeVersion)),
api.TinkerbellToConfigFiller(
imageForKubeVersionAndOS(kubeVersion, os, ""),
imageForKubeVersionAndOS(kubeVersion, os, "", rtos...),
api.WithOsFamilyForAllTinkerbellMachines(osFamiliesForOS[os]),
),
)
Expand Down Expand Up @@ -191,8 +193,11 @@ func (t *Tinkerbell) WithNewWorkerNodeGroup(name string, workerNodeGroup *Worker
panic("Not implemented for Tinkerbell yet")
}

func envVarForImage(os OS, kubeVersion anywherev1.KubernetesVersion) string {
func envVarForImage(os OS, kubeVersion anywherev1.KubernetesVersion, rtos ...bool) string {
imageEnvVar := fmt.Sprintf("T_TINKERBELL_IMAGE_%s_%s", strings.ToUpper(strings.ReplaceAll(string(os), "-", "_")), strings.ReplaceAll(string(kubeVersion), ".", "_"))
if len(rtos) > 0 && rtos[0] {
imageEnvVar = fmt.Sprintf("%s_RTOS", imageEnvVar)
}
return imageEnvVar
}

Expand Down Expand Up @@ -319,14 +324,14 @@ func WithHookImagesURLPath(url string) TinkerbellOpt {
}

// imageForKubeVersionAndOS sets osImageURL on the appropriate field in the Machine Config based on the machineConfigType string provided else sets it at Data Center config.
func imageForKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, operatingSystem OS, machineConfigType string) api.TinkerbellFiller {
func imageForKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, operatingSystem OS, machineConfigType string, rtos ...bool) api.TinkerbellFiller {
var tinkerbellFiller api.TinkerbellFiller
if machineConfigType == workerIdentifier {
tinkerbellFiller = api.WithTinkerbellWorkerMachineConfigOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion)), osFamiliesForOS[operatingSystem])
tinkerbellFiller = api.WithTinkerbellWorkerMachineConfigOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion, rtos...)), osFamiliesForOS[operatingSystem])
} else if machineConfigType == controlPlaneIdentifier {
tinkerbellFiller = api.WithTinkerbellCPMachineConfigOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion)), osFamiliesForOS[operatingSystem])
tinkerbellFiller = api.WithTinkerbellCPMachineConfigOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion, rtos...)), osFamiliesForOS[operatingSystem])
} else {
tinkerbellFiller = api.WithTinkerbellOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion)))
tinkerbellFiller = api.WithTinkerbellOSImageURL(os.Getenv(envVarForImage(operatingSystem, kubeVersion, rtos...)))
}
return tinkerbellFiller
}
Expand Down Expand Up @@ -431,6 +436,11 @@ func Ubuntu2204Kubernetes129Image() api.TinkerbellFiller {
return imageForKubeVersionAndOS(anywherev1.Kube129, Ubuntu2204, "")
}

// Ubuntu2204Kubernetes129RTOSImage represents an Ubuntu 22.04 RTOS raw image corresponding to Kubernetes 1.29.
func Ubuntu2204Kubernetes129RTOSImage() api.TinkerbellFiller {
return imageForKubeVersionAndOS(anywherev1.Kube129, Ubuntu2204, "", true)
}

// Ubuntu2204Kubernetes130Image represents an Ubuntu 22.04 raw image corresponding to Kubernetes 1.30.
func Ubuntu2204Kubernetes130Image() api.TinkerbellFiller {
return imageForKubeVersionAndOS(anywherev1.Kube130, Ubuntu2204, "")
Expand Down
4 changes: 2 additions & 2 deletions test/framework/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func WithVSphereWorkerNodeGroup(name string, workerNodeGroup *WorkerNodeGroup, f
}

// WithMachineTemplate returns an api.ClusterConfigFiller that changes template in machine template.
func (v *VSphere) WithMachineTemplate(machineName string, template string) api.ClusterConfigFiller {
func (v *VSphere) WithMachineTemplate(machineName, template string) api.ClusterConfigFiller {
return api.JoinClusterConfigFillers(
api.VSphereToConfigFiller(api.WithMachineTemplate(machineName, template)),
)
Expand Down Expand Up @@ -391,7 +391,7 @@ func (v *VSphere) ClusterConfigUpdates() []api.ClusterConfigFiller {

// WithKubeVersionAndOS returns a cluster config filler that sets the cluster kube version and the right template for all
// vsphere machine configs.
func (v *VSphere) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease) api.ClusterConfigFiller {
func (v *VSphere) WithKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS, release *releasev1.EksARelease, _ ...bool) api.ClusterConfigFiller {
return api.JoinClusterConfigFillers(
api.ClusterToConfigFiller(api.WithKubernetesVersion(kubeVersion)),
api.VSphereToConfigFiller(
Expand Down

0 comments on commit 5f34092

Please sign in to comment.