Skip to content

Commit 63a809b

Browse files
Merge pull request #1715 from dinhxuanvu/fix-stale-bundle
Bug 1867169: Fix stale content in configmap due to stale bundle image in the node
2 parents 9b6e7a3 + f7c0171 commit 63a809b

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

pkg/controller/bundle/bundle_unpacker.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
106106
},
107107
},
108108
{
109-
Name: "pull",
110-
Image: bundlePath,
111-
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
109+
Name: "pull",
110+
Image: bundlePath,
111+
ImagePullPolicy: "Always",
112+
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
112113
VolumeMounts: []corev1.VolumeMount{
113114
{
114115
Name: "bundle",

pkg/controller/bundle/bundle_unpacker_test.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ func TestConfigMapUnpacker(t *testing.T) {
226226
},
227227
},
228228
{
229-
Name: "pull",
230-
Image: bundlePath,
231-
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
229+
Name: "pull",
230+
Image: bundlePath,
231+
ImagePullPolicy: "Always",
232+
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
232233
VolumeMounts: []corev1.VolumeMount{
233234
{
234235
Name: "bundle",
@@ -382,9 +383,10 @@ func TestConfigMapUnpacker(t *testing.T) {
382383
},
383384
},
384385
{
385-
Name: "pull",
386-
Image: bundlePath,
387-
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
386+
Name: "pull",
387+
Image: bundlePath,
388+
ImagePullPolicy: "Always",
389+
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
388390
VolumeMounts: []corev1.VolumeMount{
389391
{
390392
Name: "bundle",
@@ -577,9 +579,10 @@ func TestConfigMapUnpacker(t *testing.T) {
577579
},
578580
},
579581
{
580-
Name: "pull",
581-
Image: bundlePath,
582-
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
582+
Name: "pull",
583+
Image: bundlePath,
584+
ImagePullPolicy: "Always",
585+
Command: []string{"/util/cpb", "/bundle"}, // Copy bundle content to its mount
583586
VolumeMounts: []corev1.VolumeMount{
584587
{
585588
Name: "bundle",

0 commit comments

Comments
 (0)