Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
| 16 | apiVersion: batch/v1 |
| 17 | kind: Job |
| 18 | metadata: |
| 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 }} |
| 25 | spec: |
| 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 Williams | d9d6b35 | 2018-10-05 07:53:30 -0700 | [diff] [blame] | 37 | image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }} |
| 38 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 39 | resources: |
| 40 | {{ toYaml .Values.resources | indent 12 }} |
| 41 | volumeMounts: |
| 42 | - name: mcord-subscriber-config |
Matteo Scandolo | a174170 | 2018-06-12 14:23:45 -0700 | [diff] [blame] | 43 | mountPath: /opt/xos/synchronizers/mcord/mounted_config.yaml |
| 44 | subPath: mounted_config.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 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 |
Matteo Scandolo | a174170 | 2018-06-12 14:23:45 -0700 | [diff] [blame] | 54 | path: mounted_config.yaml |
Andy Bavier | a40e82b | 2018-05-07 17:00:36 -0700 | [diff] [blame] | 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 }} |