Skip to content

Commit

Permalink
Pull Kanister tools image only if not present (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavannd1 committed Nov 11, 2020
1 parent d619b5a commit 38a5db8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/kube/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func CreatePod(ctx context.Context, cli kubernetes.Interface, opts *PodOptions)
Name: "container",
Image: opts.Image,
Command: opts.Command,
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: volumeMounts,
},
},
Expand Down
12 changes: 6 additions & 6 deletions pkg/kube/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"sh", "-c", "echo in default specs"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down Expand Up @@ -295,7 +295,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"sh", "-c", "echo in default specs"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down Expand Up @@ -389,7 +389,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"sh", "-c", "echo in default specs"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down Expand Up @@ -450,7 +450,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"sh", "-c", "echo in default specs"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down Expand Up @@ -513,7 +513,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"echo", "override command"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down Expand Up @@ -553,7 +553,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) {
Name: "container",
Image: "kanisterio/kanister-tools:0.41.0",
Command: []string{"echo", "override command"},
ImagePullPolicy: v1.PullPolicy(v1.PullAlways),
ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent),
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down

0 comments on commit 38a5db8

Please sign in to comment.