blob: 63caaaa3087ed0ec6180e655876a6a80d7248b7f [file] [log] [blame]
Woojoong Kima053c4a2019-08-09 16:19:14 -07001---
2# Copyright 2019-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 "comac.fullname" . }}-tosca-loader
20 labels:
21 app: {{ template "comac.name" . }}
22 chart: {{ template "comac.chart" . }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 backoffLimit: 12
27 template:
28 metadata:
29 labels:
30 app: {{ template "comac.name" . }}
31 release: {{ .Release.Name }}
32 annotations:
33 checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
34 spec:
35 restartPolicy: OnFailure
36 containers:
37 - name: {{ .Chart.Name }}-tosca-loader
Woojoong Kim4e3f0992019-09-30 14:27:12 -070038 image: {{ .Values.global.registry }}{{ .Values.images.toscaLoader.repository }}:{{ tpl .Values.images.toscaLoader.tag . }}
39 imagePullPolicy: {{ .Values.images.toscaLoader.pullPolicy }}
Woojoong Kima053c4a2019-08-09 16:19:14 -070040 env:
41 - name: XOS_USER
42 value: {{ .Values.xosAdminUser }}
43 - name: XOS_PASSWD
44 valueFrom:
45 secretKeyRef:
46 name: xos-admin-passwd-secret
47 key: password
48 volumeMounts:
49 - name: comac-tosca
50 mountPath: /opt/tosca
51 volumes:
52 - name: comac-tosca
53 configMap:
54 name: comac-tosca