Skip to content

Commit

Permalink
Fix cluster role
Browse files Browse the repository at this point in the history
  • Loading branch information
Cdayz committed Mar 13, 2024
1 parent a638e65 commit 891d25e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/k8s-image-pre-puller/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rules:
- apiGroups:
- apps
resources:
- daemonset
- daemonsets
verbs:
- create
- delete
Expand All @@ -37,7 +37,7 @@ rules:
- apiGroups:
- apps
resources:
- daemonset/status
- daemonsets/status
verbs:
- get
- apiGroups:
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/prepullimage_reconciller.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ func (r *prePullImageReconciller) getTolerationsByNodeSelector(ctx context.Conte
}

tolerationMap := map[string]corev1.Toleration{}
for _, item := range nodes.Items {
for _, taint := range item.Spec.Taints {
for _, node := range nodes.Items {
for _, taint := range node.Spec.Taints {
if strings.HasPrefix(taint.Key, BuiltinKubernetesTaintKeyPrefix) {
// WARN: we should avoid to add tolerations for builtin taints
continue
Expand Down

0 comments on commit 891d25e

Please sign in to comment.