mirror of
https://github.com/rancher/types.git
synced 2025-08-02 05:11:59 +00:00
Only do initializing for rancher types
This commit is contained in:
parent
019aa7fc1e
commit
3c6d1ba9b8
@ -181,7 +181,8 @@ func Set(data map[string]interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
if state == "" && len(conditions) == 0 {
|
||||
apiVersion, _ := values.GetValueN(data, "apiVersion").(string)
|
||||
if state == "" && 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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user