-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add status conditions helpers #1143
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 status conditions helpers #1143
Conversation
83e4fdf
to
7bfe2bd
Compare
Submitted upstream issue: kubernetes-sigs/controller-tools#155 |
As suggested by @shawn-hurley, I tried using a typed slice for the status conditions helper and implementing the same set of methods that are on the struct (see commit 4f8388a). type ConditionsSlice []Condition Unfortunately, that also fails during
I traced that error back to here: https://github.com/kubernetes/kube-openapi/blob/15615b16d372105f0c69ff47dfe7402926a65aaa/pkg/generators/openapi.go#L624 It looks like there's potential for upstream work related to this error as well. For example, the |
12fa1a5
to
0abfef9
Compare
0abfef9
to
4b462dd
Compare
9d81420
to
57f4c07
Compare
5774b86
to
784c03a
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 - is any user facing documentation required for this change?
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.
New file license years need to be changed, and 2 suggestions. Overall LGTM.
@jmccormick2001 Good point, I'll see if I can find a spot to mention this. Maybe in the user guide. I tried to make the GoDoc comments pretty verbose/descriptive since this is mainly a bunch of optional helpers in a library, but it is helpful and is worth highlighting in a user-facing doc as well. |
784c03a
to
983d536
Compare
24a45b5
to
3b9548e
Compare
3b9548e
to
e715299
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.
Just grammar nits, otherwise
/lgtm
Co-Authored-By: Eric Stroczynski <[email protected]>
New changes are detected. LGTM label has been removed. |
Description of the change:
This PR adds status condition helpers that simplify setting and checking conditions on CR status fields.
Motivation for the change:
To promote the use of status conditions and to help users implement them consistently and according to best practices.