Skip to content

Commit

Permalink
add rbac role for tencentcloud provider (#193)
Browse files Browse the repository at this point in the history
Signed-off-by: roc <roc@imroc.cc>
  • Loading branch information
imroc authored Jan 8, 2025
1 parent 65d2306 commit 8c229c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,24 @@ rules:
- get
- patch
- update
- apiGroups:
- networking.cloud.tencent.com
resources:
- dedicatedclblisteners
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.cloud.tencent.com
resources:
- dedicatedclblisteners/status
verbs:
- get
- apiGroups:
- networking.k8s.io
resources:
Expand Down
3 changes: 2 additions & 1 deletion pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func init() {
// +kubebuilder:rbac:groups=elbv2.k8s.aws,resources=targetgroupbindings,verbs=create;get;list;patch;update;watch
// +kubebuilder:rbac:groups=elbv2.services.k8s.aws,resources=listeners,verbs=create;get;list;patch;update;watch
// +kubebuilder:rbac:groups=elbv2.services.k8s.aws,resources=targetgroups,verbs=create;get;list;patch;update;watch
// +kubebuilder:rbac:groups=networking.cloud.tencent.com,resources=dedicatedclblisteners,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=networking.cloud.tencent.com,resources=dedicatedclblisteners/status,verbs=get

type Webhook struct {
mgr manager.Manager
Expand Down Expand Up @@ -135,7 +137,6 @@ func (ws *Webhook) Initialize(cfg *rest.Config) error {
}

clientSet, err := clientset.NewForConfig(cfg)

if err != nil {
return err
}
Expand Down

0 comments on commit 8c229c1

Please sign in to comment.