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 []ConditionUnfortunately, 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
jmccormick2001
left a comment
There was a problem hiding this comment.
/lgtm - is any user facing documentation required for this change?
estroz
left a comment
There was a problem hiding this comment.
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
estroz
left a comment
There was a problem hiding this comment.
Just grammar nits, otherwise
/lgtm
Co-Authored-By: Eric Stroczynski <estroczy@redhat.com>
|
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.