Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
fix: Schedule Aqua scan jobs to the specified node (#24)
Browse files Browse the repository at this point in the history
Resolves: #23

Signed-off-by: Daniel Pacak <[email protected]>
  • Loading branch information
danielpacak authored Jul 27, 2020
1 parent ad7f2b2 commit 87f9dae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/aqua/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (s *scanner) PrepareScanJob(_ context.Context, resource kube.Object, spec c
Spec: core.PodSpec{
RestartPolicy: core.RestartPolicyNever,
ServiceAccountName: serviceAccountName,
NodeName: spec.NodeName,
Volumes: []core.Volume{
{
Name: "scannercli",
Expand Down
2 changes: 2 additions & 0 deletions pkg/aqua/scanner/scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestScanner_PrepareScanJob(t *testing.T) {
Name: "nginx",
Namespace: "dev",
}, core.PodSpec{
NodeName: "worker-node",
Containers: []core.Container{
{
Name: "nginx",
Expand Down Expand Up @@ -95,6 +96,7 @@ func TestScanner_PrepareScanJob(t *testing.T) {
Spec: core.PodSpec{
RestartPolicy: core.RestartPolicyNever,
ServiceAccountName: "starboard-scanner-aqua",
NodeName: "worker-node",
Volumes: []core.Volume{
{
Name: "scannercli",
Expand Down

0 comments on commit 87f9dae

Please sign in to comment.