Skip to content

Commit e616b65

Browse files
authored
Add permissions for leases.coordination.k8s.io (open-telemetry#151)
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
1 parent 10f3fb2 commit e616b65

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

config/rbac/role.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ rules:
7373
- patch
7474
- update
7575
- watch
76+
- apiGroups:
77+
- coordination.k8s.io
78+
resources:
79+
- leases
80+
verbs:
81+
- create
82+
- get
83+
- list
84+
- update
7685
- apiGroups:
7786
- opentelemetry.io
7887
resources:

controllers/opentelemetrycollector_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler {
105105

106106
// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete
107107
// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch
108+
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update
108109

109110
// Reconcile the current state of an OpenTelemetry collector resource with the desired state.
110111
func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) {

0 commit comments

Comments
 (0)