Skip to content

Commit 6899d00

Browse files
authored
RBAC: allow cluster admins to see all attributes (#1185)
* RBAC: allow cluster admins to see all attributes Signed-off-by: Pavol Loffay <p.loffay@gmail.com> * chlog Signed-off-by: Pavol Loffay <p.loffay@gmail.com> --------- Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
1 parent 23489b9 commit 6899d00

File tree

8 files changed

+19
-8
lines changed

8 files changed

+19
-8
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: bug_fix
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. tempostack, tempomonolithic, github action)
5+
component: tempostack, tempomonolithic
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Allow OpenShift cluster admins to see all attributes when RBAC is enabled.
9+
10+
# One or more tracking issues related to the change
11+
issues: [1185]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
This change removes `--opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin`
18+
from the OpenShift OPA configuration. This configures the OPA to always return
19+
all user's accessible namespaces required by the RBAC feature.

internal/manifests/gateway/openshift.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func patchOCPOPAContainer(params manifestutils.Params, dep *v1.Deployment) (*v1.
221221
func NewOpaContainer(ctrlConfig configv1alpha1.ProjectConfig, tenants v1alpha1.TenantsSpec, rbac bool, opaPackage string, resources corev1.ResourceRequirements) corev1.Container {
222222
var args = []string{
223223
"--log.level=warn",
224-
"--opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin",
225224
fmt.Sprintf("--web.listen=:%d", gatewayOPAHTTPPort),
226225
fmt.Sprintf("--web.internal.listen=:%d", gatewayOPAInternalPort),
227226
fmt.Sprintf("--web.healthchecks.url=http://localhost:%d", gatewayOPAHTTPPort),

internal/manifests/gateway/openshift_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func TestPatchOPAContainer(t *testing.T) {
4242
require.Equal(t, 1, len(dep.Spec.Template.Spec.Containers))
4343
assert.Equal(t, []string{
4444
"--log.level=warn",
45-
"--opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin",
4645
"--web.listen=:8082", "--web.internal.listen=:8083",
4746
"--web.healthchecks.url=http://localhost:8082",
4847
"--opa.package=tempostack",

internal/manifests/monolithic/statefulset_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ func TestStatefulsetGateway(t *testing.T) {
939939
Image: "quay.io/observatorium/opa-openshift:x.y.z",
940940
Args: []string{
941941
"--log.level=warn",
942-
"--opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin",
943942
"--web.listen=:8082",
944943
"--web.internal.listen=:8083",
945944
"--web.healthchecks.url=http://localhost:8082",
@@ -1224,7 +1223,6 @@ func TestStatefulsetGatewayRBAC(t *testing.T) {
12241223
Image: "quay.io/observatorium/opa-openshift:x.y.z",
12251224
Args: []string{
12261225
"--log.level=warn",
1227-
"--opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin",
12281226
"--web.listen=:8082",
12291227
"--web.internal.listen=:8083",
12301228
"--web.healthchecks.url=http://localhost:8082",

tests/e2e-openshift/component-replicas/install-tempo-assert.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ spec:
232232
readOnly: true
233233
- args:
234234
- --log.level=warn
235-
- --opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin
236235
- --web.listen=:8082
237236
- --web.internal.listen=:8083
238237
- --web.healthchecks.url=http://localhost:8082

tests/e2e-openshift/component-replicas/scale-tempo-assert.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ spec:
232232
readOnly: true
233233
- args:
234234
- --log.level=warn
235-
- --opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin
236235
- --web.listen=:8082
237236
- --web.internal.listen=:8083
238237
- --web.healthchecks.url=http://localhost:8082

tests/e2e-openshift/multitenancy-rbac/01-assert.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ spec:
182182
protocol: TCP
183183
- args:
184184
- --log.level=warn
185-
- --opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin
186185
- --web.listen=:8082
187186
- --web.internal.listen=:8083
188187
- --web.healthchecks.url=http://localhost:8082

tests/e2e-openshift/multitenancy/01-assert.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ spec:
237237
readOnly: true
238238
- args:
239239
- --log.level=warn
240-
- --opa.admin-groups=system:cluster-admins,cluster-admin,dedicated-admin
241240
- --web.listen=:8082
242241
- --web.internal.listen=:8083
243242
- --web.healthchecks.url=http://localhost:8082

0 commit comments

Comments
 (0)