Skip to content

Commit c24d256

Browse files
authored
Add linux node selector to bundleUnpacker job (#2685)
* add node selector Signed-off-by: Michelle Nguyen <[email protected]> * fix tests Signed-off-by: Michelle Nguyen <[email protected]> --------- Signed-off-by: Michelle Nguyen <[email protected]>
1 parent 3e00959 commit c24d256

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

pkg/controller/bundle/bundle_unpacker.go

+3
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
211211
},
212212
},
213213
},
214+
NodeSelector: map[string]string{
215+
"kubernetes.io/os": "linux",
216+
},
214217
},
215218
},
216219
},

pkg/controller/bundle/bundle_unpacker_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ func TestConfigMapUnpacker(t *testing.T) {
329329
},
330330
},
331331
},
332+
NodeSelector: map[string]string{
333+
"kubernetes.io/os": "linux",
334+
},
332335
},
333336
},
334337
},
@@ -531,6 +534,9 @@ func TestConfigMapUnpacker(t *testing.T) {
531534
},
532535
},
533536
},
537+
NodeSelector: map[string]string{
538+
"kubernetes.io/os": "linux",
539+
},
534540
},
535541
},
536542
},
@@ -774,6 +780,9 @@ func TestConfigMapUnpacker(t *testing.T) {
774780
},
775781
},
776782
},
783+
NodeSelector: map[string]string{
784+
"kubernetes.io/os": "linux",
785+
},
777786
},
778787
},
779788
},
@@ -1011,6 +1020,9 @@ func TestConfigMapUnpacker(t *testing.T) {
10111020
},
10121021
},
10131022
},
1023+
NodeSelector: map[string]string{
1024+
"kubernetes.io/os": "linux",
1025+
},
10141026
},
10151027
},
10161028
},
@@ -1218,6 +1230,9 @@ func TestConfigMapUnpacker(t *testing.T) {
12181230
},
12191231
},
12201232
},
1233+
NodeSelector: map[string]string{
1234+
"kubernetes.io/os": "linux",
1235+
},
12211236
},
12221237
},
12231238
},
@@ -1436,6 +1451,9 @@ func TestConfigMapUnpacker(t *testing.T) {
14361451
},
14371452
},
14381453
},
1454+
NodeSelector: map[string]string{
1455+
"kubernetes.io/os": "linux",
1456+
},
14391457
},
14401458
},
14411459
},

0 commit comments

Comments
 (0)