Skip to content

Commit 1b4fa94

Browse files
authored
Merge pull request kubernetes#95229 from aojea/sourcelb
e2e can't use both pod.Name and pod.GenerateName
2 parents ef33126 + 3e182e8 commit 1b4fa94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/e2e/framework/pod/resource.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,9 @@ func NewExecPodSpec(ns, name string, hostNetwork bool) *v1.Pod {
456456

457457
// newExecPodSpec returns the pod spec of exec pod
458458
func newExecPodSpec(ns, generateName string) *v1.Pod {
459-
pod := NewAgnhostPod(ns, "agnhost-pod", nil, nil, nil)
459+
// GenerateName is an optional prefix, used by the server,
460+
// to generate a unique name ONLY IF the Name field has not been provided
461+
pod := NewAgnhostPod(ns, "", nil, nil, nil)
460462
pod.ObjectMeta.GenerateName = generateName
461463
return pod
462464
}

0 commit comments

Comments
 (0)