Skip to content

Commit

Permalink
Add leases permissions to manifest. (#1704)
Browse files Browse the repository at this point in the history
* Fix leasing permisions

Signed-off-by: Ruben Vargas <[email protected]>

* Fix linting

Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 authored Jan 10, 2022
1 parent ac6d50e commit a6bfbc5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
9 changes: 9 additions & 0 deletions bundle/manifests/jaeger-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ spec:
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
- apiGroups:
- ""
resources:
Expand Down
9 changes: 9 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ rules:
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
- apiGroups:
- ""
resources:
Expand Down
3 changes: 2 additions & 1 deletion controllers/appsv1/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ func NewDeploymentReconciler(client client.Client, clientReader client.Reader, s
}
}

// Reconcile deployment resource
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch

// Reconcile deployment resource
func (r *DeploymentReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
return r.reconcilier.Reconcile(ctx, request)
}
Expand Down
3 changes: 2 additions & 1 deletion controllers/appsv1/namespace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ func NewNamespaceReconciler(client client.Client, clientReader client.Reader, sc
}
}

// Reconcile namespace resource
// +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=namespaces/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch

// Reconcile namespace resource
func (r *NamespaceReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
return r.reconcilier.Reconcile(request)
}
Expand Down
4 changes: 3 additions & 1 deletion controllers/jaegertracing/jaeger_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func NewReconciler(client client.Client, clientReader client.Reader, scheme *run
}
}

// Reconcile jaeger resource
// +kubebuilder:rbac:groups=jaegertracing.io,resources=jaegers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=jaegertracing.io,resources=jaegers/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=jaegertracing.io,resources=jaegers/finalizers,verbs=update
Expand All @@ -55,6 +54,9 @@ func NewReconciler(client client.Client, clientReader client.Reader, scheme *run
// +kubebuilder:rbac:groups=logging.openshift.io,resources=elasticsearches,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=kafka.strimzi.io,resources=kafkas;kafkausers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=clusterrolebindings,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update

// Reconcile jaeger resource
func (r *JaegerReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
return r.reconcilier.Reconcile(request)
}
Expand Down

0 comments on commit a6bfbc5

Please sign in to comment.