fixing bug in new config pod
[oom.git] / kubernetes / config / templates / pod.yaml
1 apiVersion: v1
2 kind: ConfigMap
3 metadata:
4   name: global-onap-configmap
5   namespace: "{{ .Values.nsPrefix }}"
6 data:
7   {{ (.Files.Glob "onap-parameters.yaml").AsConfig | indent 2 }}
8 ---
9 apiVersion: v1
10 kind: Pod
11 metadata:
12   name: {{ .Chart.Name }}
13   namespace: "{{ .Values.nsPrefix }}"
14 spec:
15   containers:
16     - name: {{ .Chart.Name }}
17       image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
18       imagePullPolicy: {{ .Values.image.pullPolicy }}
19       envFrom:
20         - configMapRef:
21             name: global-onap-configmap
22       env:
23       - name: NAMESPACE
24         valueFrom:
25           fieldRef:
26             fieldPath: metadata.namespace
27       - name: NAMESPACE_PREFIX
28         value: {{ .Values.nsPrefix }}            
29       - name: DOCKER_SHARE_PATH
30         value: {{ .Values.dockerSharePath }}
31       volumeMounts:
32       - name: config-init-root
33         mountPath: /config-init/
34   volumes:
35     - name: config-init-root
36       hostPath:
37         path: {{ .Values.dockerSharePath }}
38   restartPolicy: Never