mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Move from go-yaml/yaml to ghodss/yaml
This commit is contained in:
@@ -59,10 +59,13 @@ func CreateValidPod(name, namespace, source string) api.BoundPod {
|
||||
}
|
||||
|
||||
func CreatePodUpdate(op kubelet.PodOperation, pods ...api.BoundPod) kubelet.PodUpdate {
|
||||
if len(pods) == 0 {
|
||||
return kubelet.PodUpdate{Op: op}
|
||||
}
|
||||
// We deliberately return an empty slice instead of a nil pointer here
|
||||
// because reflect.DeepEqual differentiates between the two and we need to
|
||||
// pick one for consistency.
|
||||
newPods := make([]api.BoundPod, len(pods))
|
||||
if len(pods) == 0 {
|
||||
return kubelet.PodUpdate{newPods, op}
|
||||
}
|
||||
for i := range pods {
|
||||
newPods[i] = pods[i]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user