Commit Graph

2 Commits

Author SHA1 Message Date
Kenjiro Nakayama c13e86e2d4
Add MarkTrueWithReason function to ConditionManager (#1148)
* Add MarkTrueWithReason function to ConditionManager

When using `MarkTrue()` function, it does not allow us to add the reason and message.
Also, if we use `SetCondition()` instead, it does not update the happy condtion.

So, this PR adds new `MarkTrueWithReason(reason, message)` function.

* Make test better

* Add unit test for MarkTrueWithReason

* Rename markHappy with recomputeHappiness
2020-03-19 09:36:06 -07:00
Matt Moore 281cda84ce Move Condition stuff to apis, add a v1beta1 Status. (#361)
This moves the common Condition stuff to apis, and creates a v1beta1 form of Status that uses the Condition it defines (changing this in v1alpha1 is too breaking).

There aren't really any meaningful changes in this PR, mostly reorganization.  Enumerating what I did:
1. Copied `condition_set*.go` to `apis/`,
1. Copied the `Condition` portions of `conditions_types.go` to `apis/`,
1. Copied the balance of `conditions_types.go` to `apis/duck/v1beta1/status_types.go`,
1. Changed the parts of the above to reference things in the appropriate new places,
1. Removed the reflection-based `ConditionsAccessor` stuff, implementing it instead on `duckv1beta1.Status`.
1. Incorporate: https://github.com/knative/pkg/pull/358
2019-04-02 09:51:55 -07:00