mirror of https://github.com/knative/pkg.git
The backbone of our Condition system is our "happy" condition and the semantics governing how other subconditions influence that condition. When looking towards Conversion, it is possible for the set of conditions to vary between `v1alpha1` and `v1beta1`, but the "happy" condition should remain consistent across versions. The main changes: 1. Provide a `ConvertTo` helper for "converting" between `duckv1beta1.Status` types in this "lowest common denominator" sense, where we just copy the happy condition. 2. When `InitializeConditions()` (plural) is called, seed the initial state of sub-conditions from the initial state of the "happy" condition, if True. This change enables us to completely change the condition space across versions, while maintaining the consistency of the happy condition. A couple peripheral changes: 1. Add `context.Context` to the `apis.Convertible` interface. 2. Drop `InitializeCondition()` (singular) from the `ConditionsManager` interface (I don't see any usage outside of this file). |
||
|---|---|---|
| .. | ||
| duck | ||
| istio | ||
| testing | ||
| OWNERS | ||
| condition_set.go | ||
| condition_set_impl_test.go | ||
| condition_set_test.go | ||
| condition_types.go | ||
| condition_types_test.go | ||
| contexts.go | ||
| contexts_test.go | ||
| doc.go | ||
| field_error.go | ||
| field_error_test.go | ||
| interfaces.go | ||
| kind2resource.go | ||
| kind2resource_test.go | ||
| metadata_validation.go | ||
| metadata_validation_test.go | ||
| volatile_time.go | ||
| volatile_time_test.go | ||
| zz_generated.deepcopy.go | ||