1
0
mirror of https://github.com/rancher/types.git synced 2025-09-18 07:52:41 +00:00

only set nodeAffinity to null

This commit is contained in:
Daishan Peng
2018-06-20 14:01:20 -07:00
committed by Alena Prokharchyk
parent f092c91a56
commit e2ad869a98

View File

@@ -207,7 +207,7 @@ func (s SchedulingMapper) ToInternal(data map[string]interface{}) {
preferred := convert.ToStringSlice(values.GetValueN(data, "scheduling", "node", "preferred"))
if len(requireAll) == 0 && len(requireAny) == 0 && len(preferred) == 0 {
data["affinity"] = nil
values.PutValue(data, nil, "affinity", "nodeAffinity")
return
}