Skip to content

Commit 55f56ec

Browse files
authored
Merge pull request #42573 from qingwave/fix-sidecar-example
Fix sidecar example in init-container doc
2 parents 8dda7bc + 0a1909c commit 55f56ec

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

content/en/examples/application/deployment-sidecar.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ spec:
1717
containers:
1818
- name: myapp
1919
image: alpine:latest
20-
command: ['sh', '-c', 'echo "logging" > /opt/logs.txt']
20+
command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done']
2121
volumeMounts:
2222
- name: data
2323
mountPath: /opt
2424
initContainers:
2525
- name: logshipper
2626
image: alpine:latest
2727
restartPolicy: Always
28-
command: ['sh', '-c', 'tail /opt/logs.txt']
28+
command: ['sh', '-c', 'tail -F /opt/logs.txt']
2929
volumeMounts:
3030
- name: data
3131
mountPath: /opt
32-
volumes:
33-
- name: data
34-
emptyDir: {}
32+
volumes:
33+
- name: data
34+
emptyDir: {}

content/en/examples/application/job/job-sidecar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
- name: logshipper
1717
image: alpine:latest
1818
restartPolicy: Always
19-
command: ['sh', '-c', 'tail /opt/logs.txt']
19+
command: ['sh', '-c', 'tail -F /opt/logs.txt']
2020
volumeMounts:
2121
- name: data
2222
mountPath: /opt

0 commit comments

Comments
 (0)