Merge pull request #42573 from qingwave/fix-sidecar-example
Fix sidecar example in init-container docpull/42579/head
commit
55f56ecfd2
|
@ -17,7 +17,7 @@ spec:
|
|||
containers:
|
||||
- name: myapp
|
||||
image: alpine:latest
|
||||
command: ['sh', '-c', 'echo "logging" > /opt/logs.txt']
|
||||
command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done']
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /opt
|
||||
|
@ -25,10 +25,10 @@ spec:
|
|||
- name: logshipper
|
||||
image: alpine:latest
|
||||
restartPolicy: Always
|
||||
command: ['sh', '-c', 'tail /opt/logs.txt']
|
||||
command: ['sh', '-c', 'tail -F /opt/logs.txt']
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /opt
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
|
@ -16,7 +16,7 @@ spec:
|
|||
- name: logshipper
|
||||
image: alpine:latest
|
||||
restartPolicy: Always
|
||||
command: ['sh', '-c', 'tail /opt/logs.txt']
|
||||
command: ['sh', '-c', 'tail -F /opt/logs.txt']
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /opt
|
||||
|
|
Loading…
Reference in New Issue