-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RHEL8 and RHEL9 fix for validation webhook and tests for Nutanix #6822
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -419,6 +419,96 @@ func TestNutanixKubernetes127SimpleFlowWithName(t *testing.T) { | |
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes128RedHatSimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat128Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes124RedHatSimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat124Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes125RedHatSimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat125Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes126RedHatSimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat126Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes127RedHatSimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat127Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes128RedHat9SimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes128Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes124RedHat9SimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes124Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes125RedHat9SimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes125Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes126RedHat9SimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes126Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes127RedHat9SimpleFlowWithName(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes127Nutanix()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes128SimpleFlowWithUUID(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
|
@@ -474,6 +564,28 @@ func TestNutanixKubernetes127SimpleFlowWithUUID(t *testing.T) { | |
runSimpleFlow(test) | ||
} | ||
|
||
func TestNutanixKubernetes128RedHatSimpleFlowWithUUID(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat128NutanixUUID(), | ||
framework.WithPrismElementClusterUUID(), | ||
framework.WithNutanixSubnetUUID()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
Comment on lines
+567
to
+576
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think we need separate UUID tests since the images are going to be the same and it's not really adding a lot more coverage. If we really wanted, we can keep just the 128 tests for UUID and remove the other ones. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @abhinavmpandey08 Fixed |
||
|
||
func TestNutanixKubernetes128RedHat9SimpleFlowWithUUID(t *testing.T) { | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
framework.NewNutanix(t, framework.WithRedHat9Kubernetes128NutanixUUID(), | ||
framework.WithPrismElementClusterUUID(), | ||
framework.WithNutanixSubnetUUID()), | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
) | ||
runSimpleFlow(test) | ||
} | ||
|
||
// Upgrade | ||
func TestNutanixKubernetes127To128UbuntuUpgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) | ||
|
@@ -541,6 +653,142 @@ func TestNutanixKubernetes126To127UbuntuUpgrade(t *testing.T) { | |
) | ||
} | ||
|
||
func TestNutanixKubernetes127to128RedHatUpgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat127Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube128, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
provider.WithProviderUpgrade(provider.RedHat128Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes124to125RedHatUpgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat124Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube125, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
provider.WithProviderUpgrade(provider.RedHat125Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes125to126RedHatUpgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat125Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube126, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
provider.WithProviderUpgrade(provider.RedHat126Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes126to127RedHatUpgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat126Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube127, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
provider.WithProviderUpgrade(provider.RedHat127Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes127to128RedHat9Upgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat9Kubernetes127Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube128, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube128)), | ||
provider.WithProviderUpgrade(provider.RedHat9Kubernetes128Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes124to125RedHat9Upgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat9Kubernetes124Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube125, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
provider.WithProviderUpgrade(provider.RedHat9Kubernetes125Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes125to126RedHat9Upgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat9Kubernetes125Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube126, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
provider.WithProviderUpgrade(provider.RedHat9Kubernetes126Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes126to127RedHat9Upgrade(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithRedHat9Kubernetes126Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
t, | ||
provider, | ||
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), | ||
framework.WithClusterFiller(api.WithControlPlaneCount(1)), | ||
framework.WithClusterFiller(api.WithWorkerNodeCount(1)), | ||
) | ||
runSimpleUpgradeFlow( | ||
test, | ||
v1alpha1.Kube127, | ||
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube127)), | ||
provider.WithProviderUpgrade(provider.RedHat9Kubernetes127Template()), | ||
) | ||
} | ||
|
||
func TestNutanixKubernetes128UbuntuWorkerNodeScaleUp1To3(t *testing.T) { | ||
provider := framework.NewNutanix(t, framework.WithUbuntu128Nutanix()) | ||
test := framework.NewClusterE2ETest( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of deleting this entire validation, can we do something like
if c.Spec.OSFamily != Ubuntu && c.Spec.OSFamily != RedHat
for ex:
eks-anywhere/pkg/api/v1alpha1/vspheremachineconfig.go
Line 87 in e53af28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahreehong Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
RedHat
OSFamily cover both redhat8 and redhat9There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinavmpandey08 Yeah.
https://github.com/aws/eks-anywhere/pull/6822/files#diff-ed18f85e94add304fc61a5b5e588087980e478789e065ae3e8e2ea7a38735a75L27-R31