Skip to content

Commit

Permalink
add node watch back
Browse files Browse the repository at this point in the history
Signed-off-by: ashnamehrotra <[email protected]>
  • Loading branch information
ashnamehrotra committed Jan 24, 2024
1 parent 1465339 commit c6f9262
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
2 changes: 1 addition & 1 deletion controllers/imagelist/imagelist_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ type Reconciler struct {
//+kubebuilder:rbac:groups=eraser.sh,resources=imagelists,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=podtemplates,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=eraser.sh,resources=imagelists/status,verbs=get;update;patch
//+kubebuilder:rbac:groups="",resources=nodes,verbs=get;list
//+kubebuilder:rbac:groups="",resources=nodes,verbs=get;list;watch
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;update;create;delete

// Reconcile is part of the main kubernetes reconciliation loop which aims to
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func main() {
},
),
},
// to watch ImageLists
&eraserv1.ImageList{}: {
Field: fields.OneTermEqualSelector("metadata.name", "imagelist"),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
3 changes: 2 additions & 1 deletion manifest_staging/deploy/eraser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -431,7 +432,7 @@ data:
imageJob:
successRatio: 1.0
cleanup:
delayOnSuccess: 0s
delayOnSuccess: 24h
delayOnFailure: 24h
pullSecrets: [] # image pull secrets for collector/scanner/eraser
priorityClassName: "" # priority class name for collector/scanner/eraser
Expand Down

0 comments on commit c6f9262

Please sign in to comment.