Skip to content

Commit 19e0f29

Browse files
authored
Merge pull request #82755 from aireilly/TELCODOCS-2052-cluster-logging
TELCODOCS-2052 - Update Cluster logging for Telco SNO clusters
2 parents fe7e771 + 7bcb74a commit 19e0f29

6 files changed

+116
-30
lines changed
Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,64 @@
11
// Module included in the following assemblies:
22
//
3-
// * scalability_and_performance/ztp_far_edge/ztp-reference-cluster-configuration-for-vdu.adoc
3+
// * edge_computing/ztp-reference-cluster-configuration-for-vdu.adoc
44

55
:_mod-docs-content-type: CONCEPT
66
[id="ztp-sno-du-configuring-logging-locally-and-forwarding_{context}"]
77
= Cluster logging and log forwarding
88

9-
{sno-caps} clusters that run DU workloads require logging and log forwarding for debugging. The following `ClusterLogging` and `ClusterLogForwarder` custom resources (CRs) are required.
9+
{sno-caps} clusters that run DU workloads require logging and log forwarding for debugging.
10+
The following custom resources (CRs) are required.
1011

11-
.Recommended cluster logging configuration (`ClusterLogging.yaml`)
12+
[id="ztp-clusterlogforwarder-yaml"]
13+
.Recommended ClusterLogForwarder.yaml
1214
[source,yaml]
1315
----
14-
include::snippets/ztp_ClusterLogging.yaml[]
16+
include::snippets/ztp_ClusterLogForwarder.yaml[]
1517
----
1618

17-
.Recommended log forwarding configuration (`ClusterLogForwarder.yaml`)
19+
[NOTE]
20+
====
21+
Set the `spec.outputs.kafka.url` field to the URL of the Kafka server where the logs are forwarded to.
22+
====
23+
24+
[id="ztp-clusterlogns-yaml"]
25+
.Recommended ClusterLogNS.yaml
1826
[source,yaml]
1927
----
20-
include::snippets/ztp_ClusterLogForwarder.yaml[]
28+
include::snippets/ztp_ClusterLogNS.yaml[]
29+
----
30+
31+
[id="ztp-clusterlogopergroup-yaml"]
32+
.Recommended ClusterLogOperGroup.yaml
33+
[source,yaml]
34+
----
35+
include::snippets/ztp_ClusterLogOperGroup.yaml[]
36+
----
37+
38+
[id="ztp-clusterlogserviceaccount-yaml"]
39+
.Recommended ClusterLogServiceAccount.yaml
40+
[source,yaml]
41+
----
42+
include::snippets/ztp_ClusterLogServiceAccount.yaml[]
2143
----
2244

23-
Set the `spec.outputs.url` field to the URL of the Kafka server where the logs are forwarded to.
45+
[id="ztp-clusterlogserviceaccountauditbinding-yaml"]
46+
.Recommended ClusterLogServiceAccountAuditBinding.yaml
47+
[source,yaml]
48+
----
49+
include::snippets/ztp_ClusterLogServiceAccountAuditBinding.yaml[]
50+
----
51+
52+
[id="ztp-clusterlogserviceaccountinfrastructurebinding-yaml"]
53+
.Recommended ClusterLogServiceAccountInfrastructureBinding.yaml
54+
[source,yaml]
55+
----
56+
include::snippets/ztp_ClusterLogServiceAccountInfrastructureBinding.yaml[]
57+
----
58+
59+
[id="ztp-clusterlogsubscription-yaml"]
60+
.Recommended ClusterLogSubscription.yaml
61+
[source,yaml]
62+
----
63+
include::snippets/ztp_ClusterLogSubscription.yaml[]
64+
----

snippets/ztp_ClusterLogForwarder.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
1-
apiVersion: "logging.openshift.io/v1"
1+
apiVersion: "observability.openshift.io/v1"
22
kind: ClusterLogForwarder
33
metadata:
44
name: instance
55
namespace: openshift-logging
66
annotations: {}
77
spec:
8-
# outputs: $outputs
9-
# pipelines: $pipelines
10-
11-
#apiVersion: "logging.openshift.io/v1"
8+
# outputs: $outputs
9+
# pipelines: $pipelines
10+
serviceAccount:
11+
name: log6collector
12+
#apiVersion: "observability.openshift.io/v1"
1213
#kind: ClusterLogForwarder
1314
#metadata:
1415
# name: instance
1516
# namespace: openshift-logging
16-
#spec:
17-
# outputs:
18-
# - type: "kafka"
19-
# name: kafka-open
20-
# url: tcp://10.46.55.190:9092/test
21-
# pipelines:
22-
# - inputRefs:
23-
# - audit
24-
# - infrastructure
25-
# labels:
26-
# label1: test1
27-
# label2: test2
28-
# label3: test3
29-
# label4: test4
30-
# name: all-to-default
31-
# outputRefs:
32-
# - kafka-open
17+
# spec:
18+
# outputs:
19+
# - type: "kafka"
20+
# name: kafka-open
21+
# # below url is an example
22+
# kafka:
23+
# url: tcp://10.46.55.190:9092/test
24+
# filters:
25+
# - name: test-labels
26+
# type: openshiftLabels
27+
# openshiftLabels:
28+
# label1: test1
29+
# label2: test2
30+
# label3: test3
31+
# label4: test4
32+
# pipelines:
33+
# - name: all-to-default
34+
# inputRefs:
35+
# - audit
36+
# - infrastructure
37+
# filterRefs:
38+
# - test-labels
39+
# outputRefs:
40+
# - kafka-open
41+
# serviceAccount:
42+
# name: log6collector
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: log6collector
6+
namespace: openshift-logging
7+
annotations: {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: logcollector-audit-logs-binding
6+
annotations: {}
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: collect-audit-logs
11+
subjects:
12+
- kind: ServiceAccount
13+
name: log6collector
14+
namespace: openshift-logging
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
name: logcollector-infrastructure-logs-binding
6+
annotations: {}
7+
roleRef:
8+
apiGroup: rbac.authorization.k8s.io
9+
kind: ClusterRole
10+
name: collect-infrastructure-logs
11+
subjects:
12+
- kind: ServiceAccount
13+
name: log6collector
14+
namespace: openshift-logging

snippets/ztp_ClusterLogSubscription.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: openshift-logging
66
annotations: {}
77
spec:
8-
channel: "stable"
8+
channel: "stable-6.0"
99
name: cluster-logging
1010
source: redhat-operators-disconnected
1111
sourceNamespace: openshift-marketplace

0 commit comments

Comments
 (0)