From bfa03ab6a010c426c930538175c5a7bc3591f43e Mon Sep 17 00:00:00 2001 From: "navid.shariaty" Date: Sun, 14 May 2023 13:07:51 +0330 Subject: [PATCH] add create verb for sa on ns --- api/v1alpha1/team_webhook.go | 2 +- config/rbac/role.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/team_webhook.go b/api/v1alpha1/team_webhook.go index fdfd428..7a015ef 100644 --- a/api/v1alpha1/team_webhook.go +++ b/api/v1alpha1/team_webhook.go @@ -42,7 +42,7 @@ func (t *Team) SetupWebhookWithManager(mgr ctrl.Manager) error { // TODO(user): EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation. -//+kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;patch;update;watch +//+kubebuilder:rbac:groups="",resources=namespaces,verbs=create;get;list;patch;update;watch //+kubebuilder:rbac:groups=authorization.k8s.io,resources=localsubjectaccessreviews,verbs=create //+kubebuilder:webhook:path=/validate-team-snappcloud-io-v1alpha1-team,mutating=false,failurePolicy=fail,sideEffects=None,groups=team.snappcloud.io,resources=teams,verbs=create;update,versions=v1alpha1,name=vteam.kb.io,admissionReviewVersions=v1 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d996a4a..cc0a752 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -10,6 +10,7 @@ rules: resources: - namespaces verbs: + - create - get - list - patch