Skip to content

Commit 8ff2ab2

Browse files
authored
Merge pull request #45977 from asem-hamid/deployment-sidecar.yaml
[bn] Adding deployment-sidecar.yaml in bn version
2 parents 05e38b9 + cdd3486 commit 8ff2ab2

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: myapp
5+
labels:
6+
app: myapp
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: myapp
12+
template:
13+
metadata:
14+
labels:
15+
app: myapp
16+
spec:
17+
containers:
18+
- name: myapp
19+
image: alpine:latest
20+
command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done']
21+
volumeMounts:
22+
- name: data
23+
mountPath: /opt
24+
initContainers:
25+
- name: logshipper
26+
image: alpine:latest
27+
restartPolicy: Always
28+
command: ['sh', '-c', 'tail -F /opt/logs.txt']
29+
volumeMounts:
30+
- name: data
31+
mountPath: /opt
32+
volumes:
33+
- name: data
34+
emptyDir: {}

0 commit comments

Comments
 (0)