pkg/apis
Kenjiro Nakayama fcff978f32
Do not set to unknown status when all dependents passed happy check (#1187)
* Do not set to unknown status when all dependents passed unhappy check

`accessor.GetConditions()` in `findUnhappyDependent()` gets status
filed from runtime. So, if an object has following status:

```
  status:
    address:
      url: http://hello-example.default.svc.cluster.local
    conditions:
    - lastTransitionTime: "2020-04-02T09:49:03Z"
      status: "True"
      type: AllTrafficAssigned
    - lastTransitionTime: "2020-04-02T09:49:03Z"
      message: autoTLS is not enabled
      reason: AutoTLSNotEnabled
      severity: Info
      status: "True"
      type: CertificateProvisioned
    - lastTransitionTime: "2020-04-02T09:49:05Z"
      status: "True"
      type: IngressReady
    - lastTransitionTime: "2020-04-02T09:49:05Z"
      status: "True"
      type: Ready
```

`accessor.GetConditions()` returns AllTrafficAssigned,
CertificateProvisioned, IngressReady (and Ready).

Then, current code (`len(r.dependents) != len(conditions)`) sets to
Unknown if all conditions are not unhappy. However, it does not work
if we added a new dependent and downgraded the cluster because
the number of dependents is less than current status conditions.

If all dependents are verified, it should not set to unknown
status. So, this patch changed it.

* Add unit test
2020-04-04 11:10:18 -07:00
..
duck add CloudEventAttributes to duckv1.SourceStatus (#1165) 2020-03-20 09:08:22 -07:00
test Generate reconcilers for resources out of tree. (#1175) 2020-03-25 11:34:51 -07:00
testing Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
OWNERS Update OWNERS to use OWNERS_ALIASES (#422) 2019-05-29 20:04:33 -07:00
condition_set.go Do not set to unknown status when all dependents passed happy check (#1187) 2020-04-04 11:10:18 -07:00
condition_set_impl_test.go Do not set to unknown status when all dependents passed happy check (#1187) 2020-04-04 11:10:18 -07:00
condition_set_test.go Add MarkTrueWithReason function to ConditionManager (#1148) 2020-03-19 09:36:06 -07:00
condition_types.go Nil check conditions (#1112) 2020-02-20 11:20:06 -08:00
condition_types_test.go Nil check conditions (#1112) 2020-02-20 11:20:06 -08:00
contexts.go check KReference namespace matches parent. Allow escape hatch. (#1052) 2020-02-05 08:04:31 -08:00
contexts_test.go check KReference namespace matches parent. Allow escape hatch. (#1052) 2020-02-05 08:04:31 -08:00
convert.go Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
convert_test.go Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
deprecated.go Fix the issues pointed out by staticcheck (#541) 2019-07-23 13:13:36 -07:00
deprecated_test.go Migrate pkg to use the knative.dev/pkg import path (#489) 2019-06-26 13:02:06 -07:00
doc.go Add deepcopy-gen for VolatileTime. (#42) 2018-08-09 16:32:03 -07:00
field_error.go Introduce error util ErrInvalidCombination for invalid combination (#638) 2019-09-12 16:44:32 -07:00
field_error_test.go Introduce error util ErrInvalidCombination for invalid combination (#638) 2019-09-12 16:44:32 -07:00
interfaces.go Fixed #1057 - Rename ConvertUp/Down to ConvertTo/From (#1122) 2020-02-24 09:44:08 -08:00
kind2resource.go Create a common way for turning GVK into GVR. (#84) 2018-09-21 14:07:21 -07:00
kind2resource_test.go Create a common way for turning GVK into GVR. (#84) 2018-09-21 14:07:21 -07:00
metadata_validation.go Add validation for creator and lastModifier annotation (#539) 2019-07-28 21:51:04 -07:00
metadata_validation_test.go Add validation for creator and lastModifier annotation (#539) 2019-07-28 21:51:04 -07:00
url.go Provide an semantic equality func for apis.URL (#987) 2020-01-10 10:25:57 -08:00
url_test.go Fix the URL errors for go1.14 (#1027) 2020-01-31 11:12:28 -08:00
volatile_time.go Remove openapi-gen annotations (#775) 2019-11-05 13:03:27 -08:00
volatile_time_test.go Move VolatileTime into knative/pkg (#40) 2018-08-09 15:58:51 -07:00
zz_generated.deepcopy.go update boilerplate to use 2020 (#979) 2020-01-07 16:04:51 -08:00