Skip to content

Commit

Permalink
Add linux node selector to bundleUnpacker job (#2685)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
aimichelle authored Apr 24, 2023
1 parent 3e00959 commit c24d256
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/bundle/bundle_unpacker.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ func (c *ConfigMapUnpacker) job(cmRef *corev1.ObjectReference, bundlePath string
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down
18 changes: 18 additions & 0 deletions pkg/controller/bundle/bundle_unpacker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down Expand Up @@ -531,6 +534,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down Expand Up @@ -774,6 +780,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down Expand Up @@ -1011,6 +1020,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down Expand Up @@ -1218,6 +1230,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down Expand Up @@ -1436,6 +1451,9 @@ func TestConfigMapUnpacker(t *testing.T) {
},
},
},
NodeSelector: map[string]string{
"kubernetes.io/os": "linux",
},
},
},
},
Expand Down

0 comments on commit c24d256

Please sign in to comment.