forked from usdot-jpo-ode/jpo-ode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjpoode_ode.yaml
177 lines (177 loc) · 4.22 KB
/
jpoode_ode.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
177
---
apiVersion: v1
kind: Service
metadata:
name: jpoode-ode-tcp-svc
labels:
app: jpoode-ode
spec:
type: LoadBalancer
ports:
- name: ode-scp
protocol: TCP
port: 22
- name: ode-webserver
protocol: TCP
port: 8080
loadBalancerSourceRanges:
{{- range .Values.config.ode.sourceRanges }}
- {{ . | title }}
{{- end }}
selector:
app: jpoode-ode
---
apiVersion: v1
kind: Service
metadata:
name: jpoode-ode-udp-svc
annotations:
networking.gke.io/load-balancer-type: "Internal"
labels:
app: jpoode-ode
spec:
type: LoadBalancer
loadBalancerIP: {{ .Values.config.ode.udp_service.ipAddress }}
ports:
- name: ode-rsu-bsm
protocol: UDP
port: 46800
- name: ode-rsu-tim
protocol: UDP
port: 47900
- name: ode-rsu-ssm
protocol: UDP
port: 44900
- name: ode-rsu-spat
protocol: UDP
port: 44910
- name: ode-rsu-map
protocol: UDP
port: 44920
- name: ode-rsu-srm
protocol: UDP
port: 44930
externalTrafficPolicy: Local
selector:
app: jpoode-ode
---
{{- if .Values.config.ode.udp_service.exposeExternally }}
apiVersion: v1
kind: Service
metadata:
name: jpoode-ode-udp-svc-ext
labels:
app: jpoode-ode
spec:
type: LoadBalancer
ports:
- name: ode-rsu-bsm
protocol: UDP
port: 46801
- name: ode-rsu-tim
protocol: UDP
port: 47901
externalTrafficPolicy: Local
loadBalancerSourceRanges:
{{- range .Values.config.ode.sourceRanges }}
- {{ . | title }}
{{- end }}
selector:
app: jpoode-ode
{{- end }}
---
# ConfigMap for OpenSSH configuration
apiVersion: v1
kind: ConfigMap
metadata:
name: ssh-config
data:
sshd_config: |
PasswordAuthentication no
ChallengeResponseAuthentication no
authorized_keys: |
ssh-keys-goes-here
each-key-goes-on-a-new-lines
another-key
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "jpoode-ode"
labels:
app: "jpoode-ode"
spec:
replicas: {{ .Values.replicas.jpoode_ode }}
selector:
matchLabels:
app: "jpoode-ode"
template:
metadata:
labels:
app: "jpoode-ode"
spec:
containers:
- name: "jpoode-ode-image-sha256-1"
image: "{{ .Values.images.jpoode_ode.repository }}:{{ .Values.images.jpoode_ode.tag }}"
resources:
requests:
memory: "1.5Gi"
cpu: "1"
tty: true
stdin: true
ports:
- containerPort: 22
- containerPort: 8080
- containerPort: 9090
- containerPort: 46800
protocol: UDP
- containerPort: 47900
protocol: UDP
{{- if .Values.config.ode.udp_service.exposeExternally }}
- containerPort: 46801
protocol: UDP
- containerPort: 47901
protocol: UDP
{{- end }}
env:
- name: DOCKER_HOST_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: ODE_KAFKA_BROKERS
value: {{ .Values.resources.services.kafka }}:9092
- name: ZK
value: {{ .Values.resources.services.zookeeper }}:2181
- name: ODE_SECURITY_SVCS_SIGNATURE_URI
value: {{ .Values.resources.services.security }}:8090
- name: ODE_RSU_USERNAME
valueFrom:
secretKeyRef:
name: jpoode-secrets
key: ode_rsu_username
- name: ODE_RSU_PASSWORD
valueFrom:
secretKeyRef:
name: jpoode-secrets
key: ode_rsu_password
volumeMounts:
- name: config-volume
mountPath: /home/logging
- name: ssh-volume
subPath: sshd_config
mountPath: /etc/ssh/sshd_config
- name: ssh-volume
subPath: authorized_keys
mountPath: /root/.ssh/authorized_keys
- name: obulog-volume
mountPath: /home/uploads/backup
volumes:
- name: config-volume
configMap:
name: logback-conf
- name: ssh-volume
configMap:
name: ssh-config
- name: obulog-volume
persistentVolumeClaim:
claimName: filestore-pvc