Skip to content

Commit 6c2afd5

Browse files
committed
tailer-webhook: fix inconsistent example names, indentation
Signed-off-by: Szilard Parrag <szilard.parrag@axoflow.com>
1 parent 68bc5a7 commit 6c2afd5

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

content/docs/configuration/extensions/tailer-webhook.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ To trigger the webhook, add the following annotation to the pod metadata:
160160

161161
### File tailer example
162162

163-
The following example creates a pod that is running a shell in infinite loop that appends the `date` command's output to a file every second. The annotation `sidecar.logging-extensions.banzaicloud.io/tail` notifies Logging operator to attach a sidecar container to the pod. The sidecar tails the `/legacy-logs/date.log` file and sends its output to the stdout.
163+
The following example creates a pod that is running a shell in infinite loop that appends the `date` command's output to a file every second. The annotation `sidecar.logging-extensions.banzaicloud.io/tail` notifies Logging operator to attach a sidecar container to the pod. The sidecar tails the `/var/log/date` file and sends its output to the stdout.
164164

165165
```yaml
166166
apiVersion: v1
@@ -171,16 +171,13 @@ metadata:
171171
spec:
172172
containers:
173173
- image: debian
174-
name: sample-container
175-
command: ["/bin/sh", "-c"]
176-
args:
177-
- while true; do
178-
date >> /var/log/date;
179-
sleep 1;
180-
done
181-
- image: debian
182-
name: sample-container2
183-
...
174+
name: sample-container
175+
command: ["/bin/sh", "-c"]
176+
args:
177+
- while true; do
178+
date >> /var/log/date;
179+
sleep 1;
180+
done
184181
```
185182

186183
After you have created the pod with the required annotation, make sure that the `test-pod` contains two containers by running `kubectl get pod`
@@ -202,15 +199,15 @@ Expected output:
202199

203200
```bash
204201
[
205-
"test",
206-
"legacy-logs-date-log"
202+
"sample-container",
203+
"sample-container-var-log-date"
207204
]
208205
```
209206

210207
Check the logs of the `test` container. Since it writes the logs into a file, it does not produce any logs on stdout.
211208

212209
```bash
213-
kubectl logs test-pod test; echo $?
210+
kubectl logs test-pod sample-container; echo $?
214211
```
215212

216213
Expected output:

0 commit comments

Comments
 (0)