93c64ab3dd66125156ab7a3d9be8b1c0065df572
[oom.git] / kubernetes / config / templates / pod.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 apiVersion: v1
16 kind: ConfigMap
17 metadata:
18   name: global-onap-configmap
19   namespace: "{{ .Values.nsPrefix }}"
20 data:
21 {{ .Files.Get "onap-parameters.yaml" | indent 2 }}
22 ---
23 apiVersion: v1
24 kind: Pod
25 metadata:
26   name: {{ .Chart.Name }}
27   namespace: "{{ .Values.nsPrefix }}"
28 spec:
29   containers:
30     - name: {{ .Chart.Name }}
31       image: "{{ .Values.image.repository }}"
32       imagePullPolicy: {{ .Values.image.pullPolicy }}
33       envFrom:
34         - configMapRef:
35             name: global-onap-configmap
36       env:
37       - name: NAMESPACE
38         valueFrom:
39           fieldRef:
40             fieldPath: metadata.namespace
41       - name: NAMESPACE_PREFIX
42         value: {{ .Values.nsPrefix }}
43       - name: DOCKER_SHARE_PATH
44         value: {{ .Values.dockerSharePath }}
45       volumeMounts:
46       - name: config-init-root
47         mountPath: /config-init/
48   volumes:
49     - name: config-init-root
50       hostPath:
51         path: {{ .Values.dockerSharePath }}
52   restartPolicy: Never