mirror of
https://github.com/rancher/types.git
synced 2025-06-28 06:26:49 +00:00
Workload endpoints: bug fix for publicEndpoints when annotation is nil
This commit is contained in:
parent
8d7dbe2543
commit
4ccd2f14eb
@ -12,10 +12,10 @@ type WorkloadAnnotations struct {
|
||||
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{}{}
|
||||
if _, ok := data["annotations"]; !ok {
|
||||
data["annotations"] = map[string]interface{}{}
|
||||
}
|
||||
annotations := convert.ToMapInterface(data["annotations"])
|
||||
annotations["field.cattle.io/publicEndpoints"] = v
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user