Unverified Commit 1cbb61f8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #64938 from brendandburns/todo2

Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove an old TODO. The ImagePullPolicy is immediately overwritten by the call to `updatePodSpec` below the initialization, so it's not needed where it is.
parents f0421807 84dd19eb
......@@ -877,8 +877,6 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object,
if len(restartPolicy) == 0 {
restartPolicy = v1.RestartPolicyAlways
}
// TODO: Figure out why we set ImagePullPolicy here, whether we can make it
// consistent with the other places imagePullPolicy is set using flag.
pod := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: name,
......@@ -888,13 +886,12 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object,
ServiceAccountName: params["serviceaccount"],
Containers: []v1.Container{
{
Name: name,
Image: params["image"],
ImagePullPolicy: v1.PullIfNotPresent,
Stdin: stdin,
StdinOnce: !leaveStdinOpen && stdin,
TTY: tty,
Resources: resourceRequirements,
Name: name,
Image: params["image"],
Stdin: stdin,
StdinOnce: !leaveStdinOpen && stdin,
TTY: tty,
Resources: resourceRequirements,
},
},
DNSPolicy: v1.DNSClusterFirst,
......
......@@ -442,9 +442,8 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Name: "foo",
Image: "someimage",
},
},
DNSPolicy: v1.DNSClusterFirst,
......@@ -514,9 +513,8 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Name: "foo",
Image: "someimage",
Ports: []v1.ContainerPort{
{
ContainerPort: 80,
......@@ -545,9 +543,8 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Name: "foo",
Image: "someimage",
Ports: []v1.ContainerPort{
{
ContainerPort: 80,
......@@ -587,9 +584,8 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Name: "foo",
Image: "someimage",
},
},
DNSPolicy: v1.DNSClusterFirst,
......@@ -614,11 +610,10 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Stdin: true,
StdinOnce: true,
Name: "foo",
Image: "someimage",
Stdin: true,
StdinOnce: true,
},
},
DNSPolicy: v1.DNSClusterFirst,
......@@ -644,11 +639,10 @@ func TestGeneratePod(t *testing.T) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "foo",
Image: "someimage",
ImagePullPolicy: v1.PullIfNotPresent,
Stdin: true,
StdinOnce: false,
Name: "foo",
Image: "someimage",
Stdin: true,
StdinOnce: false,
},
},
DNSPolicy: v1.DNSClusterFirst,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment