-
Notifications
You must be signed in to change notification settings - Fork 49
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
Test Instascale machine set functionality #322
Test Instascale machine set functionality #322
Conversation
85959ff
to
cca3701
Compare
af0a38e
to
85cf71b
Compare
Co-authored-by: Karel Suta [email protected] Co-authored-by: Fiona Waters [email protected]
85cf71b
to
aa3026d
Compare
e8d50c3
to
77e0f91
Compare
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.
/lgtm
|
||
func Machines(t Test, machineSetName string) func(g gomega.Gomega) []machinev1beta1.Machine { | ||
return func(g gomega.Gomega) []machinev1beta1.Machine { | ||
machine, err := t.Client().Machine().MachineV1beta1().Machines("openshift-machine-api").List(t.Ctx(), metav1.ListOptions{LabelSelector: "machine.openshift.io/cluster-api-machineset=" + machineSetName}) |
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.
Is it OK to have openshift-machine-api
hard-coded?
|
||
func Machines(t Test, machineSetName string) func(g gomega.Gomega) []machinev1beta1.Machine { | ||
return func(g gomega.Gomega) []machinev1beta1.Machine { | ||
machine, err := t.Client().Machine().MachineV1beta1().Machines("openshift-machine-api").List(t.Ctx(), metav1.ListOptions{LabelSelector: "machine.openshift.io/cluster-api-machineset=" + machineSetName}) |
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.
Could passing the label selector as argument instead be useful?
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'm not sure if we can access the machine label easily in the test to pass it in. Could this work, or what would be the benefit of passing it as an argument? maybe it can be one variable instead of 2 also since these shouldn't change.
labelSelectorPrefix = "machine.openshift.io/cluster-api-machineset="
machine, err := t.Client().Machine().MachineV1beta1().Machines(namespaceToList).List(t.Ctx(), metav1.ListOptions{LabelSelector: labelSelectorPrefix + machineSetName})
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.
You're right, probably bette to keep it that way for now.
7e38eb2
to
93fff91
Compare
93fff91
to
ea9ee6a
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: astefanutti 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 |
Issue link
Closes #323
What changes have been made
An e2e test has been added to test the entire instascale flow on an OCP Cluster - testing machine set functionality.
Verification steps
make all-in-one
these should already be present. NFD and ClusterPolicy.instascale: enabled: false
in the Codeflare Operator config map and deploy Instascale from this image: quay.io/rh_ee_fwaters/instascale-controller:CRtest which uses this PR. Add an Instastale configMap stating a max scale out value like so:ami-0624891c612b5eaa0
.Checks