blob: 6e1ce5eee3f2cc3daf9a259ce2b7767190146837 [file] [log] [blame]
Andy Baviera40e82b2018-05-07 17:00:36 -07001---
2# Copyright 2018-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
16apiVersion: batch/v1
17kind: Job
18metadata:
19 name: {{ template "mcord-subscriber.fullname" . }}
20 labels:
21 app: {{ template "mcord-subscriber.name" . }}
22 chart: {{ template "mcord-subscriber.chart" . }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 template:
27 metadata:
28 labels:
29 app: {{ template "mcord-subscriber.name" . }}
30 release: {{ .Release.Name }}
31 annotations:
32 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
33 spec:
34 restartPolicy: Never
35 containers:
36 - name: {{ .Chart.Name }}
Zack Williamsd9d6b352018-10-05 07:53:30 -070037 image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
38 imagePullPolicy: {{ .Values.image.pullPolicy }}
Andy Baviera40e82b2018-05-07 17:00:36 -070039 resources:
40{{ toYaml .Values.resources | indent 12 }}
41 volumeMounts:
42 - name: mcord-subscriber-config
Matteo Scandoloa1741702018-06-12 14:23:45 -070043 mountPath: /opt/xos/synchronizers/mcord/mounted_config.yaml
44 subPath: mounted_config.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070045 - name: certchain-volume
46 mountPath: /usr/local/share/ca-certificates/local_certs.crt
47 subPath: config/ca_cert_chain.pem
48 volumes:
49 - name: mcord-subscriber-config
50 configMap:
51 name: mcord-subscriber
52 items:
53 - key: serviceConfig
Matteo Scandoloa1741702018-06-12 14:23:45 -070054 path: mounted_config.yaml
Andy Baviera40e82b2018-05-07 17:00:36 -070055 - name: certchain-volume
56 configMap:
57 name: ca-certificates
58 items:
59 - key: chain
60 path: config/ca_cert_chain.pem
61 {{- with .Values.nodeSelector }}
62 nodeSelector:
63{{ toYaml . | indent 8 }}
64 {{- end }}
65 {{- with .Values.affinity }}
66 affinity:
67{{ toYaml . | indent 8 }}
68 {{- end }}
69 {{- with .Values.tolerations }}
70 tolerations:
71{{ toYaml . | indent 8 }}
72 {{- end }}