Skip to content

Commit e22d1f2

Browse files
committed
OCPBUGS-27426:Add admin groups info to NetObserv
1 parent 4902ae0 commit e22d1f2

5 files changed

+54
-10
lines changed

modules/logging-creating-new-group-cluster-admin-user-role.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Module included in the following assemblies:
22

3-
// cluster-logging-loki.adoc
3+
// * cluster-logging-loki.adoc
4+
// * network_observability/installing-operators.adoc
45

56
:_mod-docs-content-type: PROCEDURE
67
[id="logging-creating-new-group-cluster-admin-user-role_{context}"]

modules/logging-loki-log-access.adoc

+28-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In {logging} 5.8 and later, the {clo} does not grant all users access to logs by
1212
* Namespace scoped policies
1313
* Creation of custom admin groups
1414
15-
As an administrator, you need to create the role bindings and cluster role bindings appropriate for your deployment. The {clo} provides the following cluster roles:
15+
As an administrator, you need to create the role bindings and cluster role bindings appropriate for your deployment. {clo} provides the following cluster roles:
1616

1717
* `cluster-logging-application-view` grants permission to read application logs.
1818
* `cluster-logging-infrastructure-view` grants permission to read infrastructure logs.
@@ -70,10 +70,36 @@ subjects:
7070
----
7171
<1> Specifies the namespace this `RoleBinding` applies to.
7272

73+
tag::ForNetObserv[]
7374
== Custom admin group access
7475

7576
If you have a large deployment with a number of users who require broader permissions, you can create a custom group using the `adminGroup` field. Users who are members of any group specified in the `adminGroups` field of the `LokiStack` CR are considered admins. Admin users have access to all application logs in all namespaces, if they also get assigned the `cluster-logging-application-view` role.
7677

78+
ifdef::network_observability[]
79+
.Example LokiStack CR
80+
[source,yaml]
81+
----
82+
apiVersion: loki.grafana.com/v1
83+
kind: LokiStack
84+
metadata:
85+
name: logging-loki
86+
namespace: openshift-logging
87+
spec:
88+
tenants:
89+
mode: openshift-network # <1>
90+
openshift:
91+
adminGroups: # <2>
92+
- cluster-admin
93+
- custom-admin-group # <3>
94+
----
95+
<1> Custom admin groups are only available in this mode.
96+
<2> Entering an empty list `[]` value for this field disables admin groups.
97+
<3> Overrides the default groups (`system:cluster-admins`, `cluster-admin`, `dedicated-admin`)
98+
endif::network_observability[]
99+
100+
end::ForNetObserv[]
101+
102+
ifdef::cluster-logging-loki[]
77103
.Example LokiStack CR
78104
[source,yaml]
79105
----
@@ -93,3 +119,4 @@ spec:
93119
<1> Custom admin groups are only available in this mode.
94120
<2> Entering an empty list `[]` value for this field disables admin groups.
95121
<3> Overrides the default groups (`system:cluster-admins`, `cluster-admin`, `dedicated-admin`)
122+
endif::cluster-logging-loki[]

modules/network-observability-lokistack-create.adoc

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
You can deploy a LokiStack using the web console or CLI to create a namespace, or new project.
1010

11-
include::snippets/logging-clusteradmin-access-logs-snip.adoc[]
12-
For more information about creating a `cluster-admin` group, see the "Additional resources" section.
13-
1411
.Procedure
1512

1613
. Navigate to *Operators* -> *Installed Operators*, viewing *All projects* from the *Project* dropdown.

network_observability/installing-operators.adoc

+24-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,30 @@ include::modules/network-observability-loki-secret.adoc[leveloffset=+2]
2929
* xref:../logging/log_storage/installing-log-storage.adoc#logging-loki-storage_installing-log-storage[Loki object storage]
3030
3131
include::modules/network-observability-lokistack-create.adoc[leveloffset=+2]
32-
33-
[role="_additional-resources"]
34-
.Additional resources
35-
* xref:../logging/log_storage/cluster-logging-loki.adoc#logging-creating-new-group-cluster-admin-user-role_cluster-logging-loki[Creating a new group for the cluster-admin user role]
32+
include::modules/logging-creating-new-group-cluster-admin-user-role.adoc[leveloffset=+2]
33+
== Custom admin group access
34+
35+
If you have a large deployment with a number of users who require broader permissions, you can create a custom group using the `adminGroup` field. Users who are members of any group specified in the `adminGroups` field of the `LokiStack` CR are considered admins. Admin users have access to all application logs in all namespaces, if they also get assigned the `cluster-logging-application-view` role.
36+
37+
.Example LokiStack CR
38+
[source,yaml]
39+
----
40+
apiVersion: loki.grafana.com/v1
41+
kind: LokiStack
42+
metadata:
43+
name: logging-loki
44+
namespace: openshift-logging
45+
spec:
46+
tenants:
47+
mode: openshift-network # <1>
48+
openshift:
49+
adminGroups: # <2>
50+
- cluster-admin
51+
- custom-admin-group # <3>
52+
----
53+
<1> Custom admin groups are only available in this mode.
54+
<2> Entering an empty list `[]` value for this field disables admin groups.
55+
<3> Overrides the default groups (`system:cluster-admins`, `cluster-admin`, `dedicated-admin`)
3656
3757
include::modules/loki-deployment-sizing.adoc[leveloffset=+2]
3858
include::modules/network-observability-lokistack-ingestion-query.adoc[leveloffset=+2]

snippets/logging-clusteradmin-access-logs-snip.adoc

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// Text snippet included in the following modules:
55
//
66
// * modules/logging-creating-new-group-cluster-admin-user-role.adoc
7-
// * modules/network-observability-lokistack-create.adoc
87
//
98
:_mod-docs-content-type: SNIPPET
109

0 commit comments

Comments
 (0)