Skip to content

Commit ca6ae30

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

6 files changed

+35
-10
lines changed

logging/log_storage/cluster-logging-loki.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ ifdef::openshift-enterprise[]
3939
* xref:../../nodes/scheduling/nodes-scheduler-pod-topology-spread-constraints.adoc#nodes-scheduler-pod-topology-spread-constraints-configuring[Controlling pod placement by using pod topology spread constraints]
4040
endif::[]
4141

42-
include::modules/logging-loki-log-access.adoc[leveloffset=+1]
42+
include::modules/logging-loki-log-access.adoc[leveloffset=+1,tag=ForLoki]
43+
4344

4445
[role="_additional-resources"]
4546
.Additional resources

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

+29-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="logging-loki-log-access_{context}"]
7+
tag::ForLoki[]
78
= Fine grained access for Loki logs
89

910
In {logging} 5.8 and later, the {clo} does not grant all users access to logs by default. As an administrator, you must configure your users' access unless the Operator was upgraded and prior configurations are in place. Depending on your configuration and need, you can configure fine grain access to logs using the following:
@@ -12,7 +13,7 @@ In {logging} 5.8 and later, the {clo} does not grant all users access to logs by
1213
* Namespace scoped policies
1314
* Creation of custom admin groups
1415
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:
16+
As an administrator, you need to create the role bindings and cluster role bindings appropriate for your deployment. {clo} provides the following cluster roles:
1617

1718
* `cluster-logging-application-view` grants permission to read application logs.
1819
* `cluster-logging-infrastructure-view` grants permission to read infrastructure logs.
@@ -93,3 +94,30 @@ spec:
9394
<1> Custom admin groups are only available in this mode.
9495
<2> Entering an empty list `[]` value for this field disables admin groups.
9596
<3> Overrides the default groups (`system:cluster-admins`, `cluster-admin`, `dedicated-admin`)
97+
end::ForLoki[]
98+
99+
tag::ForNetObserv[]
100+
== Custom admin group access
101+
102+
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.
103+
104+
.Example LokiStack CR
105+
[source,yaml]
106+
----
107+
apiVersion: loki.grafana.com/v1
108+
kind: LokiStack
109+
metadata:
110+
name: logging-loki
111+
namespace: openshift-logging
112+
spec:
113+
tenants:
114+
mode: openshift-network # <1>
115+
openshift:
116+
adminGroups: # <2>
117+
- cluster-admin
118+
- custom-admin-group # <3>
119+
----
120+
<1> Custom admin groups are only available in this mode.
121+
<2> Entering an empty list `[]` value for this field disables admin groups.
122+
<3> Overrides the default groups (`system:cluster-admins`, `cluster-admin`, `dedicated-admin`)
123+
end::ForNetObserv[]

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ 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+
include::modules/logging-creating-new-group-cluster-admin-user-role.adoc[leveloffset=+2]
33+
include::modules/logging-loki-log-access.adoc[leveloffset=+2,tag=ForNetObserv]
3234
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]
3635
3736
include::modules/loki-deployment-sizing.adoc[leveloffset=+2]
3837
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)