1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-25 06:26:50 +00:00

Changes to make conditions less chatty

This commit is contained in:
Darren Shepherd
2018-01-17 15:42:31 -07:00
parent 6f8ed342d9
commit 9e6ea56442
5 changed files with 30 additions and 7 deletions

View File

@@ -140,7 +140,11 @@ func (c Cond) doInternal(obj runtime.Object, f func() (runtime.Object, error)) (
}
if err != nil {
if _, ok := err.(*controller.ForgetError); !ok {
if _, ok := err.(*controller.ForgetError); ok {
if c.IsFalse(obj) {
c.Unknown(obj)
}
} else {
c.False(obj)
}
c.ReasonAndMessageFromError(obj, err)