blob: a6ee4e9baa84461b41bccb7bdfb57a5640e57286 [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 }}
37 image: {{ .Values.synchronizerImage | quote }}
38 imagePullPolicy: {{ .Values.imagePullPolicy }}
39 resources:
40{{ toYaml .Values.resources | indent 12 }}
41 volumeMounts:
42 - name: mcord-subscriber-config
43 mountPath: /opt/xos/synchronizers/mcord/mcord_config.yaml
44 subPath: mcord_config.yaml
45 - 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
54 path: mcord_config.yaml
55 - 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 }}