Skip to content
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
2 changes: 1 addition & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"github.com/tektoncd/pruner/pkg/webhook"
"k8s.io/client-go/tools/cache"
kubeclient "knative.dev/pkg/client/injection/kube/client"
secretinformer "knative.dev/pkg/client/injection/kube/informers/core/v1/secret"
"knative.dev/pkg/configmap"
"knative.dev/pkg/controller"
secretinformer "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/secret"
"knative.dev/pkg/injection/sharedmain"
"knative.dev/pkg/logging"
"knative.dev/pkg/signals"
Expand Down
33 changes: 4 additions & 29 deletions config/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,42 +46,27 @@ rules:
- "patch"
- "watch"

# used in webhook
# used in webhook — scoped to the single ValidatingWebhookConfiguration
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
resourceNames:
- validation.webhook.pruner.tekton.dev
verbs:
- get
- list
- create
- update
- delete
- patch
- watch

# used in webhook
# namespace informer (read-only)
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- create
- update
- delete
- patch
- watch

- apiGroups:
- ""
resources:
- namespaces/finalizers
verbs:
- update

- apiGroups:
- ""
resources:
Expand All @@ -99,13 +84,3 @@ rules:
- tekton-pruner-namespace-spec
verbs:
- get

# used in webhook for certificate management
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
Loading