-
Notifications
You must be signed in to change notification settings - Fork 0
/
add-sidecar.yaml
77 lines (77 loc) · 2.36 KB
/
add-sidecar.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apiVersion: v1
kind: Pod
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"counter","namespace":"default"},"spec":{"containers":[{"args":["/bin/sh","-c","i=0; while true; do\n echo \"$(date) INFO $i\" \u003e\u003e /var/log/legacy-app.log;\n i=$((i+1));\n sleep 1;\ndone \n"],"image":"busybox:1.28","name":"count","volumeMounts":[{"mountPath":"/var/log","name":"varlog"}]}],"volumes":[{"emptyDir":{},"name":"varlog"}]}}
creationTimestamp: "2023-10-10T12:07:21Z"
name: counter
namespace: default
resourceVersion: "25549830"
uid: a27088ac-1fef-46b4-a12f-7618f9ddaceb
spec:
containers:
- args:
- /bin/sh
- -c
- "i=0; while true; do\n echo \"$(date) INFO $i\" >> /var/log/legacy-app.log;\n
\ i=$((i+1));\n sleep 1;\ndone \n"
image: busybox:1.28
imagePullPolicy: IfNotPresent
name: count
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/log
name: varlog
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-wwbz9
readOnly: true
- name: sidecar
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/legacy-app.log']
volumeMounts:
- name: varlog
mountPath: /var/log
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: node-1
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- emptyDir: {}
name: varlog
- name: kube-api-access-wwbz9
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace