Update AAI to latest v1.1.1
[oom.git] / kubernetes / aai / templates / aai-resources-deployment.yaml
1 #{{ if not .Values.disableAaiAaiResources }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: aai-resources
6   namespace: "{{ .Values.nsPrefix }}-aai"
7 spec:
8   selector:
9     matchLabels:
10       app: aai-resources
11   template:
12     metadata:
13       labels:
14         app: aai-resources
15       name: aai-resources
16       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "hbase"
22               ],
23               "command": [
24                   "/root/ready.py"
25               ],
26               "env": [
27                   {
28                       "name": "NAMESPACE",
29                       "valueFrom": {
30                           "fieldRef": {
31                               "apiVersion": "v1",
32                               "fieldPath": "metadata.namespace"
33                           }
34                       }
35                   }
36               ],
37               "image": "{{ .Values.image.readiness }}",
38               "imagePullPolicy": "{{ .Values.pullPolicy }}",
39               "name": "aai-resources-readiness"
40           }
41         ]'
42     spec:
43       containers:
44       - name: aai-resources
45         image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
46         imagePullPolicy: {{ .Values.pullPolicy }}
47         env:
48         - name: CHEF_BRANCH
49           value: amsterdam
50         - name: AAI_CHEF_ENV
51           value: simpledemo
52         - name: AAI_CORE_VERSION
53           value: 1.1.1-SNAPSHOT
54         - name: AAI_CHEF_LOC
55           value: /var/chef/aai-data/environments
56         - name: CHEF_GIT_URL
57           value: http://gerrit.onap.org/r/aai
58         - name: HBASE_STARTUP_ARTIFICIAL_DELAY
59           value: "60"
60         volumeMounts:
61         - mountPath: /etc/localtime
62           name: localtime
63           readOnly: true
64         - mountPath: /var/chef/aai-data/
65           name: aai-data
66         - mountPath: /var/log/onap
67           name: aai-resources-logs
68         - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml
69           name: aai-resources-log-conf
70           subPath: logback.xml
71         ports:
72         - containerPort: 8447
73         readinessProbe:
74           tcpSocket:
75             port: 8447
76           initialDelaySeconds: 5
77           periodSeconds: 10
78       - name: filebeat-onap-aai-resources
79         image: {{ .Values.image.filebeat }}
80         imagePullPolicy: {{ .Values.pullPolicy }}
81         volumeMounts:
82         - mountPath: /usr/share/filebeat/filebeat.yml
83           name: filebeat-conf
84         - mountPath: /var/log/onap
85           name: aai-resources-logs
86         - mountPath: /usr/share/filebeat/data
87           name: aai-resources-filebeat
88       volumes:
89       - name: localtime
90         hostPath:
91           path: /etc/localtime
92       - name: aai-data
93         hostPath:
94           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/"
95       - name: filebeat-conf
96         hostPath:
97           path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
98       - name: aai-resources-logs
99         emptyDir: {}
100       - name: aai-resources-filebeat
101         emptyDir: {}
102       - name: aai-resources-log-conf
103         configMap:
104          name: aai-resources-configmap
105       restartPolicy: Always
106       imagePullSecrets:
107       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
108 ---
109 apiVersion: v1
110 kind: ConfigMap
111 metadata:
112   name: aai-resources-configmap
113   namespace: {{ .Values.nsPrefix }}-aai
114 data:
115 {{ (.Files.Glob "resources/resources/conf/logback.xml").AsConfig | indent 2 }}
116 #{{ end }}