Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| return mcd | ||
| } | ||
|
|
||
| // NewMachineDeploymentWithName returns a MachineDeployment with a custom name and a unique label derived from that name, |
There was a problem hiding this comment.
The canonical MCM way of identifying MCD for a machine with the name label can be used here rather than creating a different key.
| ) | ||
|
|
||
| var ( | ||
| testLabels = map[string]string{"test-label": "test-label"} |
There was a problem hiding this comment.
What is the use-case of adding this?
There was a problem hiding this comment.
Use case would be to be able to list machines created be tests easily without having to filter out machines that were already present or created by some other cluster operation
| } | ||
|
|
||
| // InPlaceMcdLabels returns the unique label map used for a given inplace test MCD name | ||
| func InPlaceMcdLabels(mcdName string) map[string]string { |
There was a problem hiding this comment.
If the only purpose of this is to identify machines belonging to a specific MCD, consider using the name label key.
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
c122a47 to
b22e6da
Compare
| originalOwnerRefMcsName := "" | ||
| for _, b := range runningMachines[0].ObjectMeta.OwnerReferences { | ||
| if b.Kind == "MachineSet" { | ||
| originalOwnerRefMcsName = b.Name |
There was a problem hiding this comment.
We can break out of the loop once we've found the MCS ownerRef.
|
|
||
| ginkgo.By("Trigger inPlace rollout by updating MachineClass") | ||
| retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { | ||
| md, _ := c.ControlCluster.McmClient.MachineV1alpha1().MachineDeployments(controlClusterNamespace).Get(ctx, helpers.InPlaceMcdNameHappyPath, metav1.GetOptions{}) |
There was a problem hiding this comment.
Shouldn't this Get error be checked for?
|
|
||
| ginkgo.By("Add node.machine.sapcloud.io/update-result:successful label to node") | ||
| retryErr = retry.RetryOnConflict(retry.DefaultRetry, func() error { | ||
| node, _ := c.TargetCluster.Clientset.CoreV1().Nodes().Get(ctx, runningMachines[0].ObjectMeta.Labels[v1alpha1.NodeLabelKey], metav1.GetOptions{}) |
There was a problem hiding this comment.
Get call's error is not being handled
| c.pollingInterval).Should(gomega.BeTrue()) | ||
|
|
||
| ginkgo.By("Verify that old mcs has been scaled to zero") | ||
| // Old mcs is not removed because mcd.Spec.RevisionHistoryLimit is set to it's default value nil. |
There was a problem hiding this comment.
| // Old mcs is not removed because mcd.Spec.RevisionHistoryLimit is set to it's default value nil. | |
| // Old mcs is not removed because mcd.Spec.RevisionHistoryLimit is set to its default value nil. |
|
|
||
| // Testcase #04 | Orphaned Resources | ||
| // Testcase #04 | InPlace Updates | ||
| ginkgo.Describe("InPlace machine update", ginkgo.Ordered, func() { |
There was a problem hiding this comment.
Can these tests not be run in parallel? Asking since they're using independent machines belonging to different MCDs.
|
PR needs rebase. DetailsInstructions 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-sigs/prow repository. |
What this PR does / why we need it:
This PR adds integration tests for machine inplace upgrade
The following scenarios have been added
Which issue(s) this PR fixes:
Fixes partially #1123
Special notes for your reviewer:
Release note: