blob: a8625e2b780c9385f8325aa47555a59aee3f4dc9 [file] [log] [blame]
Zack Williams3432b942018-04-24 17:46:41 -07001---
Gopinath Tagetb6a79b12018-03-08 17:27:37 -08002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Gopinath Taget9b609e02018-03-07 16:02:50 -080016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: xos-core
20 labels:
Zack Williams3432b942018-04-24 17:46:41 -070021 {{- include "xos-core.release_labels" . | indent 4 }}
Gopinath Taget9b609e02018-03-07 16:02:50 -080022spec:
23 replicas: 1
24 template:
25 metadata:
26 labels:
Andy Bavier3e262f22018-03-22 12:24:41 -070027 app: xos-core
Gopinath Taget9b609e02018-03-07 16:02:50 -080028 spec:
29 containers:
Andy Bavier3e262f22018-03-22 12:24:41 -070030 - name: xos-core
Zack Williamsd9d6b352018-10-05 07:53:30 -070031 image: {{ .Values.global.registry }}{{ .Values.images.xos_core.repository }}:{{ tpl .Values.images.xos_core.tag . }}
32 imagePullPolicy: {{ .Values.images.xos_core.pullPolicy }}
Gopinath Taget9b609e02018-03-07 16:02:50 -080033 command: ["/bin/bash", "-c", "cd coreapi; ./start_coreapi.sh"]
Matteo Scandolo3f2426b2019-01-18 13:46:26 -080034 # command: ["/bin/bash", "-c", "sleep 86400"]
Gopinath Taget9b609e02018-03-07 16:02:50 -080035 ports:
36 - containerPort: 50051
37 port: 50051
38 protocol: TCP
39 - containerPort: 50055
40 port: 50055
41 protocol: TCP
42 volumeMounts:
Gopinath Taget9b609e02018-03-07 16:02:50 -080043 - name: coreapi-volume
44 mountPath: /opt/cord_profile
45 readOnly: true
Zack Williams3432b942018-04-24 17:46:41 -070046 - name: certchain-volume
47 mountPath: /usr/local/share/ca-certificates/local_certs.crt
48 subPath: config/ca_cert_chain.pem
Gopinath Taget9b609e02018-03-07 16:02:50 -080049 - name: xos-core-config
50 mountPath: /opt/xos/xos_config.yaml
51 subPath: config/xos_config.yaml
52 - name: initial-data-config
53 mountPath: /opt/xos/core/migrations/initial_data.yaml
54 subPath: migrations/initial_data.yaml
55 volumes:
Gopinath Taget9b609e02018-03-07 16:02:50 -080056 - name: coreapi-volume
57 secret:
58 secretName: coreapi-cert-secret
59 items:
Zack Williams3432b942018-04-24 17:46:41 -070060 - key: tls.crt
61 path: core_api_cert.pem
62 - key: tls.key
63 path: core_api_key.pem
64 - name: certchain-volume
65 configMap:
66 name: ca-certificates
67 items:
68 - key: chain
69 path: config/ca_cert_chain.pem
Gopinath Taget9b609e02018-03-07 16:02:50 -080070 - name: xos-core-config
71 configMap:
Andy Bavier3e262f22018-03-22 12:24:41 -070072 name: xos-core
73 items:
Zack Williams3432b942018-04-24 17:46:41 -070074 - key: config
75 path: config/xos_config.yaml
Gopinath Taget9b609e02018-03-07 16:02:50 -080076 - name: initial-data-config
77 configMap:
Andy Bavier3e262f22018-03-22 12:24:41 -070078 name: xos-initial-data
79 items:
Zack Williams3432b942018-04-24 17:46:41 -070080 - key: config
81 path: migrations/initial_data.yaml
82