Adding deployment-sidecar.yaml in bn version
parent
3669477a7d
commit
cdd34866a7
|
@ -0,0 +1,34 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: myapp
|
||||
labels:
|
||||
app: myapp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: myapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: myapp
|
||||
spec:
|
||||
containers:
|
||||
- name: myapp
|
||||
image: alpine:latest
|
||||
command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done']
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /opt
|
||||
initContainers:
|
||||
- name: logshipper
|
||||
image: alpine:latest
|
||||
restartPolicy: Always
|
||||
command: ['sh', '-c', 'tail -F /opt/logs.txt']
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /opt
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
Loading…
Reference in New Issue