mirror of
https://github.com/rancher/types.git
synced 2025-09-18 07:52:41 +00:00
Embed crt status
This commit is contained in:
@@ -102,7 +102,7 @@ func Set(data map[string]interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
val, ok = values.GetValue(data, "status", "conditions")
|
||||
val, conditionsOk := values.GetValue(data, "status", "conditions")
|
||||
var conditions []condition
|
||||
if err := convert.ToObj(val, &conditions); err != nil {
|
||||
// ignore error
|
||||
@@ -182,7 +182,7 @@ func Set(data map[string]interface{}) {
|
||||
}
|
||||
|
||||
apiVersion, _ := values.GetValueN(data, "apiVersion").(string)
|
||||
if state == "" && len(conditions) == 0 && strings.Contains(apiVersion, "cattle.io") {
|
||||
if state == "" && conditionsOk && len(conditions) == 0 && strings.Contains(apiVersion, "cattle.io") {
|
||||
if val, ok := values.GetValue(data, "metadata", "created"); ok {
|
||||
if i, err := convert.ToTimestamp(val); err == nil {
|
||||
if time.Unix(i/1000, 0).Add(5 * time.Second).After(time.Now()) {
|
||||
|
Reference in New Issue
Block a user