-
Notifications
You must be signed in to change notification settings - Fork 193
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
Rework status Conditions for Globalnet resources #2487
Conversation
🤖 Created branch: z_pr2487/tpantelis/gn_status_conditions |
7766ee7
to
c899e11
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
c899e11
to
6f93575
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.
Thanks for the PR @tpantelis . Some minor comments, otherwise LGTM.
It("should trim the Status conditions", func() { | ||
Eventually(func() []metav1.Condition { | ||
return getGlobalEgressIPStatus(t.globalEgressIPs, existing.Name).Conditions | ||
}, time.Second).Should(HaveLen(1)) |
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.
same here.
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 changed it to call awaitStatusConditions
that verifies the expected condition fields in addition that there's only one.
It("should trim the Status conditions", func() { | ||
Eventually(func() []metav1.Condition { | ||
return t.getGlobalIngressIPStatus(existing.Name).Conditions | ||
}, time.Second).Should(HaveLen(1)) |
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.
ditto
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.
Same here
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
The status Conditions are appended to preserve the history however this is contrary to the intended design where each condition type should be unique and only the last status is preserved. Instead of appending, use meta.SetStatusCondition. Also trim existing conditions on upgrade to contain only the last one. Fixes submariner-io#2463 Signed-off-by: Automated Release <release@submariner.io>
42d744c
to
55c9c7d
Compare
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
🤖 Closed branches: [z_pr2487/tpantelis/gn_status_conditions] |
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
by submariner-io/submariner#2487. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
The status
Conditions
are appended to preserve the history however this is contrary to the intended design where each condition type should be unique and only the last status is preserved. Instead of appending, usemeta.SetStatusCondition
. Also trim existing conditions on upgrade to contain only the last one.Fixes #2463