Skip to content

Commit

Permalink
add rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
WeichengWang1 committed Nov 3, 2023
1 parent 2e9ac4a commit 98bb564
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,15 @@ rules:
- get
- patch
- update
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
4 changes: 4 additions & 0 deletions pkg/controllers/add_alibaba_cloud_slb.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func init() {
AddToManagerFuncs = append(AddToManagerFuncs, Add)
}

// +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;update;patch

func Add(manager manager.Manager) error {
if !feature.DefaultFeatureGate.Enabled(features.AlibabaCloudSlb) {
return nil
Expand Down

0 comments on commit 98bb564

Please sign in to comment.