-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode-0.yaml
176 lines (173 loc) · 4.72 KB
/
node-0.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
apiVersion: v1
kind: Pod
metadata:
labels:
app: node-0
name: node-0
namespace: astrid-kube
spec:
containers:
- image: astridproject/packetbeat:7.13.4-service
name: packetbeat
volumeMounts:
- name: pipelines
mountPath: /usr/share/packetbeat/packetbeat.yml
subPath: packetbeat.yml
- image: dwdraju/alpine-curl-jq:latest
name: scheduler
env:
- name: POLLING_TIME
value: "3s"
command: ["/bin/sh", "-c"]
args: ["/root/scheduler.sh"]
volumeMounts:
- name: scheduler
mountPath: /root/scheduler.sh
subPath: scheduler.sh
- name: pipelines
mountPath: /usr/share/scheduler/
- image: docker.elastic.co/logstash/logstash:7.8.0
name: logstash
#ports:
#- containerPort: 25826
#- containerPort: 5044
resources: {}
volumeMounts:
# - name: tmp-pipelines
#mountPath: /usr/share/logstash/tmp/pipeline
#mountPath: /usr/share/logstash/pipeline
- name: pipelines
mountPath: /usr/share/logstash/pipeline
- name: config
mountPath: /usr/share/logstash/config/logstash.yml
subPath: logstash.yml
- name: pipelines-config
mountPath: /usr/share/logstash/config/pipelines.yml
subPath: pipelines.yml
securityContext:
runAsUser: 0
- image: polycubenetwork/polycube:latest
name: polycube
command: ["/bin/bash", "-c"]
args: ["whoami; polycubed"]
resources: {}
volumeMounts:
- name: etc-localtime
mountPath: /etc/localtime
readOnly: true
- name: lib-modules
mountPath: /lib/modules
readOnly: true
- name: usr-src
mountPath: /usr/src
readOnly: true
- name: dev-net-tun
mountPath: /dev/net/tun
readOnly: true
securityContext:
capabilities:
#drop:
#- all
add:
- all
#- NET_BIND_SERVICE
#runAsUser: 0
# allowPrivilegeEscalation: true
- image: astridproject/lcp:master
name: lcp
env:
- name: LCP_HOST
value: "0.0.0.0"
- name: LCP_PORT
value: "5000"
- name: LCP_HTTPS
value: "false"
- name: LCP_AUTH_ENABLED
value: "true"
- name: LCP_AUTH_HEADER_PREFIX
value: "ASTRID"
- name: LCP_AUTH_SECRET_KEY
value: "astrid-secret-key"
- name: LCP_ELASTIC_APM_ENABLED
value: "false"
- name: LCP_ELASTIC_APM_SERVER
value: "http://localhost:8200"
- name: LCP_POLYCUBE_HOST
value: "localhost"
- name: LCP_POLYCUBE_PORT
value: "9000"
- name: LCP_POLYCUBE_TIMEOUT
value: "20s"
- name: LCP_LOG_CONFIG
value: "log.yaml"
volumeMounts:
- name: pipelines
mountPath: /usr/share/logstash/pipeline
- name: pipelines
mountPath: /usr/share/scheduler
initContainers:
- image: byrnedo/alpine-curl:latest
name: copy-files
command: ['sh', '-c', 'if ! [ "$(ls -A /usr/share/logstash/pipeline)" ]; then cp /usr/share/logstash/tmp/pipeline/* /usr/share/logstash/pipeline/ ; fi; if ! [ "$(ls -A /usr/share/logstash/pipeline/packetbeat.yml)" ]; then cp /usr/share/logstash/tmp/pipeline/packetbeat.yml /usr/share/logstash/pipeline/ ; fi;']
volumeMounts:
- name: tmp-pipelines
mountPath: /usr/share/logstash/tmp/pipeline
#mountPath: /usr/share/logstash/pipeline
- name: pipelines
mountPath: /usr/share/logstash/pipeline
dnsConfig:
searches:
- astrid-kube.svc.cluster.local
#restartPolicy: OnFailure
restartPolicy: Never
volumes:
- name: tmp-pipelines
configMap:
name: node-0-configmap
items:
- key: polycube_bau.conf
path: polycube_bau.conf
- key: polycube_bau_and_warn.conf
path: polycube_bau_and_warn.conf
- key: polycube_dns_bau.conf
path: polycube_dns_bau.conf
- key: polycube_dns_warn.conf
path: polycube_dns_warn.conf
- key: packetbeat.yml
path: packetbeat.yml
- name: pipelines
persistentVolumeClaim:
claimName: node-0-pv-claim
- name: config
configMap:
name: node-0-configmap
defaultMode: 0666
items:
- key: logstash.yml
path: logstash.yml
- name: pipelines-config
configMap:
name: node-0-configmap
defaultMode: 0666
items:
- key: pipelines.yml
path: pipelines.yml
- name: scheduler
configMap:
name: node-0-configmap
defaultMode: 0777
items:
- key: scheduler.sh
path: scheduler.sh
- name: lib-modules
hostPath:
path: /lib/modules
- name: usr-src
hostPath:
path: /usr/src
- name: etc-localtime
hostPath:
path: /etc/localtime
- name: dev-net-tun
hostPath:
path: /dev/net/tun