Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 65 additions & 33 deletions bundle/manifests/oadp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -544,39 +544,71 @@ spec:
expirationSeconds: 3600
path: token
permissions:
- rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
serviceAccountName: openshift-adp-controller-manager
- rules:
- apiGroups:
- ""
resources:
- secrets
- configmaps
- pods
- services
- serviceaccounts
- endpoints
- persistentvolumeclaims
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- list
- delete
- update
- patch
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
- rolebindings
verbs:
- list
- get
- create
- delete
- patch
- update
- watch
serviceAccountName: openshift-adp-controller-manager
strategy: deployment
installModes:
- supported: true
Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Namespace
metadata:
labels:
control-plane: controller-manager
openshift.io/cluster-monitoring: "true"
name: system
---
apiVersion: apps/v1
Expand Down
28 changes: 28 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ rules:
- pods
- services
- serviceaccounts
- endpoints
- persistentvolumeclaims
- events
verbs:
- list
- get
Expand Down Expand Up @@ -143,3 +146,28 @@ rules:
- patch
- update
- watch
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- list
- delete
- update
- patch
- watch
- apiGroups:
- rbac.authorization.k8s.io
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about adding these permissions to the operator, is there any other way of achieving this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-hurley we need these permissions so that the operator creates the appropriate role/rolebindings needed for the prometheus operator to scrape the metrics from our ns.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, isn't that already done by OLM when installing if you have the correct annotation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-hurley PTAL I have removed the prometheus role/rolebinding creation by OADP operator.

resources:
- roles
- rolebindings
verbs:
- list
- get
- create
- delete
- patch
- update
- watch
4 changes: 4 additions & 0 deletions controllers/dpa_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func (r *DPAReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
r.ReconcileVolumeSnapshotLocations,
r.ReconcileVeleroDeployment,
r.ReconcileResticDaemonset,
r.ReconcileVeleroServiceMonitor,
r.ReconcileVeleroMetricsSVC,
r.ReconcileMetricsRole,
r.ReconcileMetricsRoleBinding,
)

if err != nil {
Expand Down
Loading