1
0
mirror of https://github.com/rancher/types.git synced 2025-09-01 13:18:20 +00:00

Workload mapper nil pointer fix

This commit is contained in:
Alena Prokharchyk
2018-03-01 21:34:34 -08:00
parent 51a81eb72f
commit b697d5b08a

View File

@@ -13,6 +13,9 @@ func (n WorkloadAnnotations) FromInternal(data map[string]interface{}) {
v, ok := values.RemoveValue(data, "workloadAnnotations", "field.cattle.io/publicEndpoints")
if ok {
annotations := convert.ToMapInterface(data["annotations"])
if annotations == nil {
annotations = map[string]interface{}{}
}
annotations["field.cattle.io/publicEndpoints"] = v
}
}