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.
pull/8/head
Kubernetes Submit Queue 2018-06-21 04:15:08 -07:00 committed by GitHub
commit 1cbb61f8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 31 deletions

View File

@ -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,

View File

@ -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,