Update the resources deployment and traversal
[oom.git] / kubernetes / aai / templates / aai-resources-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: aai-resources
5   namespace: "{{ .Values.nsPrefix }}-aai"
6 spec:
7   selector:
8     matchLabels:
9       app: aai-resources
10   template:
11     metadata:
12       labels:
13         app: aai-resources
14       name: aai-resources
15       annotations:
16         pod.beta.kubernetes.io/init-containers: '[
17           {
18               "args": [
19                   "--container-name",
20                   "hbase"
21               ],
22               "command": [
23                   "/root/ready.py"
24               ],
25               "env": [
26                   {
27                       "name": "NAMESPACE",
28                       "valueFrom": {
29                           "fieldRef": {
30                               "apiVersion": "v1",
31                               "fieldPath": "metadata.namespace"
32                           }
33                       }
34                   }
35               ],
36               "image": "{{ .Values.image.readiness }}",
37               "imagePullPolicy": "{{ .Values.pullPolicy }}",
38               "name": "aai-resources-readiness"
39           }
40         ]'
41     spec:
42       containers:
43       - name: aai-resources
44         image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         env:
47         - name: CHEF_BRANCH
48           value: master
49         - name: AAI_CHEF_ENV
50           value: simpledemo
51         - name: AAI_CORE_VERSION
52           value: 1.1.0-SNAPSHOT
53         - name: AAI_CHEF_LOC
54           value: /var/chef/aai-data/environments
55         - name: CHEF_GIT_URL
56           value: http://gerrit.onap.org/r/aai
57         - name: LOCAL_USER_ID
58           value: "0"
59         volumeMounts:
60         - mountPath: /etc/localtime
61           name: localtime
62           readOnly: true
63         - mountPath: /opt/aai/logroot/AAI-RES
64           name: aai-resources-logs
65         - mountPath: /var/chef/aai-data/
66           name: aai-data
67         ports:
68         - containerPort: 8447
69         readinessProbe:
70           tcpSocket:
71             port: 8447
72           initialDelaySeconds: 5
73           periodSeconds: 10
74       volumes:
75       - name: localtime
76         hostPath:
77           path: /etc/localtime
78       - name: aai-resources-logs
79         hostPath:
80           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-resources/logs/"
81       - name: aai-data
82         hostPath:
83           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/"
84       restartPolicy: Always
85       imagePullSecrets:
86       - name: "{{ .Values.nsPrefix }}-docker-registry-key"