Skip to content

Commit

Permalink
Merge pull request #412 from iurygregory/newRBACs
Browse files Browse the repository at this point in the history
METAL-979: Add RBAC for newer CRDs hostfirmwarecomponents and dataimages
  • Loading branch information
openshift-merge-bot[bot] authored Apr 17, 2024
2 parents f908020 + c9362b4 commit fe323a0
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
52 changes: 52 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,32 @@ rules:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
- dataimages
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- dataimages/finalizers
verbs:
- update
- apiGroups:
- metal3.io
resources:
- dataimages/status
verbs:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
Expand All @@ -167,6 +193,32 @@ rules:
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents/finalizers
verbs:
- update
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents/status
verbs:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
Expand Down
6 changes: 6 additions & 0 deletions controllers/provisioning_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ type ensureFunc func(*provisioning.ProvisioningInfo) (bool, error)
// +kubebuilder:rbac:groups=metal3.io,resources=bmceventsubscriptions/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=validatingwebhookconfigurations,verbs=get;list;watch;update;patch;create;delete
// +kubebuilder:rbac:groups=metal3.io,resources=hardwaredata,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=metal3.io,resources=hostfirmwarecomponents,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=metal3.io,resources=hostfirmwarecomponents/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=metal3.io,resources=hostfirmwarecomponents/finalizers,verbs=update
// +kubebuilder:rbac:groups=metal3.io,resources=dataimages,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=metal3.io,resources=dataimages/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=metal3.io,resources=dataimages/finalizers,verbs=update

func (r *ProvisioningReconciler) readProvisioningCR(ctx context.Context) (*metal3iov1alpha1.Provisioning, error) {
// Fetch the Provisioning instance
Expand Down
52 changes: 52 additions & 0 deletions manifests/0000_31_cluster-baremetal-operator_05_rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,32 @@ rules:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
- dataimages
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- dataimages/finalizers
verbs:
- update
- apiGroups:
- metal3.io
resources:
- dataimages/status
verbs:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
Expand All @@ -244,6 +270,32 @@ rules:
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents/finalizers
verbs:
- update
- apiGroups:
- metal3.io
resources:
- hostfirmwarecomponents/status
verbs:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
Expand Down

0 comments on commit fe323a0

Please sign in to comment.