-
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
Conversation
adiantum
commented
Oct 16, 2023
•
edited
Loading
edited
- add rhel8 and rhel9 tests for nutanix
- add rhel8 and rhel9 template vars
- add rhel9 constants
- change NutanixMachineConfig validation
Hi @adiantum. Thanks for your PR. I'm waiting for a aws member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
- add tests - add rhel8 and rhel9 template vars - add rhel9 constants - change NutanixMachineConfig validation
/assign @abhinavmpandey08 |
@@ -153,14 +153,6 @@ func validateNutanixMachineConfig(c *NutanixMachineConfig) error { | |||
return fmt.Errorf("NutanixMachineConfig: %v", err) | |||
} | |||
|
|||
if c.Spec.OSFamily != Ubuntu { |
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:
if config.Spec.OSFamily != Bottlerocket && config.Spec.OSFamily != Ubuntu && config.Spec.OSFamily != RedHat { |
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 redhat9
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.
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) | ||
} |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
@abhinavmpandey08 Fixed
/ok-to-test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6822 +/- ##
==========================================
+ Coverage 71.99% 72.01% +0.02%
==========================================
Files 532 532
Lines 41597 41641 +44
==========================================
+ Hits 29947 29988 +41
- Misses 9978 9980 +2
- Partials 1672 1673 +1
☔ View full report in Codecov by Sentry. |
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.
Can you add all the new RHEL env vars in this file here: https://github.com/aws/eks-anywhere/blob/main/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml#L42
Something like this for all the envs should be good:
T_NUTANIX_TEMPLATE_NAME_REDHAT_1_24: "nutanix_ci:nutanix_template_rhel_8_1_24"
...
T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_24: "nutanix_ci:nutanix_template_rhel_9_1_24"
...
test/framework/nutanix.go
Outdated
nutanixTemplateNameUbuntu123Var, | ||
nutanixTemplateNameUbuntu124Var, | ||
nutanixTemplateNameUbuntu125Var, | ||
nutanixTemplateNameUbuntu126Var, | ||
nutanixTemplateNameUbuntu127Var, | ||
nutanixTemplateNameUbuntu128Var, |
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.
Can you add these back along with all the new RHEL env vars? These are needed for the tests to run in our CI.
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.
Fixed
test/framework/nutanix.go
Outdated
nutanixTemplateNameUbuntu126Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_26" | ||
nutanixTemplateNameUbuntu127Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_27" | ||
nutanixTemplateNameUbuntu128Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_28" | ||
nutanixTemplateNameRedHat123Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_23" |
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.
We are removing support for k8s v1.23 so we can remove this
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.
Fixed
test/framework/nutanix.go
Outdated
nutanixTemplateNameRedHat126Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_26" | ||
nutanixTemplateNameRedHat127Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_27" | ||
nutanixTemplateNameRedHat128Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_28" | ||
nutanixTemplateNameRedHat9123Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_23" |
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.
This isn't needed anymore either for the same reason
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.
Fixed
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavmpandey08 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |