diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index b390bd2..78deb24 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -81,7 +81,7 @@ rules: - apiGroups: - garm-operator.mercedes-benz.com resources: - - githubcredential + - githubcredentials verbs: - create - delete @@ -93,13 +93,13 @@ rules: - apiGroups: - garm-operator.mercedes-benz.com resources: - - githubcredential/finalizers + - githubcredentials/finalizers verbs: - update - apiGroups: - garm-operator.mercedes-benz.com resources: - - githubcredential/status + - githubcredentials/status verbs: - get - patch diff --git a/internal/controller/githubcredentials_controller.go b/internal/controller/githubcredentials_controller.go index 81dc1ae..86a837e 100644 --- a/internal/controller/githubcredentials_controller.go +++ b/internal/controller/githubcredentials_controller.go @@ -42,9 +42,9 @@ type GitHubCredentialReconciler struct { } //+kubebuilder:rbac:groups=core,resources=events,verbs=create;patch -//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredential,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredential/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredential/finalizers,verbs=update +//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredentials,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredentials/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=garm-operator.mercedes-benz.com,namespace=xxxxx,resources=githubcredentials/finalizers,verbs=update //+kubebuilder:rbac:groups="",namespace=xxxxx,resources=secrets,verbs=get;list;watch; func (r *GitHubCredentialReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {