Skip to content

Commit

Permalink
Add configmap premission for operator
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielXLee committed Jul 10, 2021
1 parent 7ec0dfb commit 02a5709
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml
# - manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- operator.tkestack.io
resources:
Expand Down
1 change: 1 addition & 0 deletions config/samples/operator_v1alpha1_fabric_join_broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Fabric
metadata:
name: join-broker-sample
spec:
actioin: join
joinConfig:
clusterID: cluster-b
# forceUDPEncaps: false
Expand Down
1 change: 1 addition & 0 deletions controllers/fabric_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
AllAction = "all"
)

//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=operator.tkestack.io,resources=fabrics,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=operator.tkestack.io,resources=fabrics/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=operator.tkestack.io,resources=fabrics/finalizers,verbs=update
Expand Down

0 comments on commit 02a5709

Please sign in to comment.