Skip to content

Commit

Permalink
helm: add optional monitoring RBAC to operator chart
Browse files Browse the repository at this point in the history
An older version of the Helm chart always installed RBAC permissions for
enabling monitoring. In an effort to reduce the privileges Rook uses by
default, they were removed. We need to still include the monitoring RBAC
optionally since the change could break some users.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
  • Loading branch information
BlaineEXE committed Dec 10, 2021
1 parent d40e6d7 commit 079782a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/ceph-upgrade.md
Expand Up @@ -319,6 +319,9 @@ step to upgrade the Prometheus RBAC resources as well.
kubectl apply -f deploy/examples/monitoring/rbac.yaml
```

Or, if you use only the `rook-ceph` operator Helm chart, you should also add `monitoring.enabled` to
your Helm values.

### **2. Update Ceph CSI versions**

> Automatically updated if you are upgrading via the helm chart
Expand Down
1 change: 1 addition & 0 deletions Documentation/helm-operator.md
Expand Up @@ -148,6 +148,7 @@ The following tables lists the configurable parameters of the rook-operator char
| `admissionController.tolerations` | Array of tolerations in YAML format which will be added to admission controller deployment. | <none> |
| `admissionController.nodeAffinity` | The node labels for affinity of the admission controller deployment (***) | <none> |
| `allowMultipleFilesystems` | **(experimental in Octopus (v15))** Allows multiple filesystems to be deployed to a Ceph cluster. | `false` |
| `monitoring.enabled` | Create necessary RBAC rules for Rook to integrate with prometheus monitoring. Requires Prometheus to be pre-installed. | `false` |

&ast; &ast; &ast; `nodeAffinity` and `*NodeAffinity` options should have the format `"role=storage,rook; storage=ceph"` or `storage=;role=rook-example` or `storage=;` (_checks only for presence of key_)

Expand Down
5 changes: 5 additions & 0 deletions deploy/charts/rook-ceph/templates/cluster-rbac.yaml
Expand Up @@ -26,6 +26,11 @@ roles
---
{{ include "library.cluster.roles" . }}

{{- if .Values.monitoring.enabled }}
---
{{ include "library.cluster.monitoring.roles" . }}
{{- end }}

{{/*
rolebindings
*/}}
Expand Down
5 changes: 5 additions & 0 deletions deploy/charts/rook-ceph/values.yaml
Expand Up @@ -353,3 +353,8 @@ admissionController:
# operator: Exists
# effect: NoSchedule
# nodeAffinity: key1=value1,value2; key2=value3

monitoring:
# requires Prometheus to be pre-installed
# enabling will also create RBAC rules to allow Operator to create ServiceMonitors
enabled: false

0 comments on commit 079782a

Please sign in to comment.