Skip to content

Commit a81bb23

Browse files
committed
docs: add file exporter example
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
1 parent 9e310fd commit a81bb23

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

docs/examples/file/pipeline.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: collector
5+
---
6+
apiVersion: v1
7+
kind: Namespace
8+
metadata:
9+
labels:
10+
nsSelector: example-tenant
11+
name: example-tenant-ns
12+
---
13+
apiVersion: telemetry.kube-logging.dev/v1alpha1
14+
kind: Collector
15+
metadata:
16+
name: example-collector
17+
spec:
18+
debug: true
19+
controlNamespace: collector
20+
tenantSelector:
21+
matchLabels:
22+
collectorLabel: example-collector
23+
---
24+
apiVersion: telemetry.kube-logging.dev/v1alpha1
25+
kind: Tenant
26+
metadata:
27+
labels:
28+
collectorLabel: example-collector
29+
name: example-tenant
30+
spec:
31+
subscriptionNamespaceSelectors:
32+
- matchLabels:
33+
nsSelector: example-tenant
34+
logSourceNamespaceSelectors:
35+
- matchLabels:
36+
kubernetes.io/metadata.name: logging
37+
---
38+
apiVersion: telemetry.kube-logging.dev/v1alpha1
39+
kind: Subscription
40+
metadata:
41+
name: subscription-sample-1
42+
namespace: example-tenant-ns
43+
spec:
44+
condition: "true"
45+
outputs:
46+
- name: file-test-output-1
47+
namespace: example-tenant-ns
48+
- name: file-test-output-2
49+
namespace: example-tenant-ns
50+
---
51+
apiVersion: telemetry.kube-logging.dev/v1alpha1
52+
kind: Output
53+
metadata:
54+
name: file-test-output-1
55+
namespace: example-tenant-ns
56+
spec:
57+
file:
58+
path: "/file-exporter/logs.json"
59+
append: true
60+
format: "json"
61+
---
62+
apiVersion: telemetry.kube-logging.dev/v1alpha1
63+
kind: Output
64+
metadata:
65+
name: file-test-output-2
66+
namespace: example-tenant-ns
67+
spec:
68+
file:
69+
path: "/file-exporter/logs-2.json"
70+
append: true
71+
format: "json"

0 commit comments

Comments
 (0)