Skip to content

Commit

Permalink
Update RBAC, so the controller can create/patch events (#146)
Browse files Browse the repository at this point in the history
* Update RBAC, so the controller can create/patch events

* Regenerate manifests after RBAC and controller utils change
  • Loading branch information
damyan authored Feb 17, 2023
1 parent b8eb9c5 commit 80be10f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/crd/bases/ipam.onmetal.de_ips.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
name: ips.ipam.onmetal.de
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/ipam.onmetal.de_networkcounters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
name: networkcounters.ipam.onmetal.de
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/ipam.onmetal.de_networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
name: networks.ipam.onmetal.de
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/ipam.onmetal.de_subnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
name: subnets.ipam.onmetal.de
spec:
Expand Down
7 changes: 7 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ rules:
- get
- list
- watch
- apiGroups:
- '*'
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ipam.onmetal.de
resources:
Expand Down
1 change: 1 addition & 0 deletions controllers/ip_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type IPReconciler struct {
}

// +kubebuilder:rbac:groups=*,resources=*,verbs=get;list;watch
// +kubebuilder:rbac:groups=*,resources=events,verbs=create;patch
// +kubebuilder:rbac:groups=ipam.onmetal.de,resources=ips,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=ipam.onmetal.de,resources=ips/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=ipam.onmetal.de,resources=ips/finalizers,verbs=update
Expand Down

0 comments on commit 80be10f

Please sign in to comment.