Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure windows nodes are excluded by default #628

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/manager/controller_manager_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ manager:
type: exclude # must be either exclude|include
selectors:
- eraser.sh/cleanup.filter
- kubernetes.io/os=windows
components:
collector:
enabled: true
Expand Down
10 changes: 0 additions & 10 deletions controllers/imagejob/imagejob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ var defaultTolerations = []corev1.Toleration{
}

func Add(mgr manager.Manager, cfg *config.Manager) error {
c, err := cfg.Read()
if err != nil {
return err
}

filterOpts := c.Manager.NodeFilter
if filterOpts.Type == "exclude" && !slices.Contains(filterOpts.Selectors, windowsFilterLabel) {
filterOpts.Selectors = append(filterOpts.Selectors, windowsFilterLabel)
}

return add(mgr, newReconciler(mgr, cfg))
}

Expand Down
9 changes: 5 additions & 4 deletions manifest_staging/charts/eraser/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ runtimeConfig:
# delayOnFailure: ""
pullSecrets: [] # image pull secrets for collector/scanner/eraser
priorityClassName: "" # priority class name for collector/scanner/eraser
nodeFilter: {}
# type: exclude # must be either exclude|include
# selectors:
# - eraser.sh/cleanup.filter
nodeFilter:
type: exclude # must be either exclude|include
selectors:
- eraser.sh/cleanup.filter
- kubernetes.io/os=windows
components:
collector:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions manifest_staging/deploy/eraser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ data:
type: exclude # must be either exclude|include
selectors:
- eraser.sh/cleanup.filter
- kubernetes.io/os=windows
components:
collector:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ runtimeConfig:
# delayOnFailure: ""
pullSecrets: [] # image pull secrets for collector/scanner/eraser
priorityClassName: "" # priority class name for collector/scanner/eraser
nodeFilter: {}
# type: exclude # must be either exclude|include
# selectors:
# - eraser.sh/cleanup.filter
nodeFilter:
type: exclude # must be either exclude|include
selectors:
- eraser.sh/cleanup.filter
- kubernetes.io/os=windows
components:
collector:
enabled: true
Expand Down