Skip to content

Commit 5dc06db

Browse files
committed
chore: Restore rules after discovering that the bundle-builder clusterrole is not used
1 parent fe75c9a commit 5dc06db

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

deploy/helm/opa-operator/templates/clusterrole-opa-builder.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
# This ClusterRole is for the OPA bundle builder sidecar, which reads
33
# Rego rules from ConfigMaps and compiles them into bundles for OPA.
4+
#
5+
# NOTE: This ClusterRole is currently not bound to any ServiceAccount. The
6+
# bundle-builder sidecar relies on the product ClusterRole for ConfigMap access
7+
# instead. The operator should be updated to bind this ClusterRole to the
8+
# product ServiceAccount via a separate RoleBinding.
49
apiVersion: rbac.authorization.k8s.io/v1
510
kind: ClusterRole
611
metadata:

deploy/helm/opa-operator/templates/clusterrole-product.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ metadata:
88
labels:
99
{{- include "operator.labels" . | nindent 4 }}
1010
rules:
11+
# The bundle-builder sidecar lists and watches ConfigMaps labeled opa.stackable.tech/bundle
12+
# to compile Rego rules into bundles. It shares this ServiceAccount because the bundle-builder
13+
# ClusterRole (clusterrole-opa-builder.yaml) is not yet bound to the product ServiceAccount.
14+
# TODO: Wire up the bundle-builder ClusterRole binding in the operator and remove this rule.
15+
- apiGroups:
16+
- ""
17+
resources:
18+
- configmaps
19+
verbs:
20+
- list
21+
- watch
1122
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
1223
# Required on OpenShift to allow the OPA pods to run as a non-root user.
1324
- apiGroups:

0 commit comments

Comments
 (0)