dd7d7cc9d9618118480fb9b3da86ee0d5ef7d44b
[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   replicas: {{ .Values.aaiResourceReplicas }}
9   selector:
10     matchLabels:
11       app: aai-resources
12   template:
13     metadata:
14       labels:
15         app: aai-resources
16       name: aai-resources
17     spec:
18       initContainers:
19       - command:
20         - /root/ready.py
21         args:
22         - --container-name
23         - hbase
24         env:
25         - name: NAMESPACE
26           valueFrom:
27             fieldRef:
28               apiVersion: v1
29               fieldPath: metadata.namespace
30         image: {{ .Values.image.readiness }}
31         imagePullPolicy: {{ .Values.pullPolicy }}
32         name: aai-resources-readiness
33       containers:
34       - name: aai-resources
35         image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
36         imagePullPolicy: {{ .Values.pullPolicy }}
37         env:
38         - name: CHEF_BRANCH
39           value: master
40         - name: AAI_CHEF_ENV
41           value: simpledemo
42         - name: AAI_CORE_VERSION
43           value: 1.1.0-SNAPSHOT
44         - name: AAI_CHEF_LOC
45           value: /var/chef/aai-data/environments
46         - name: CHEF_GIT_URL
47           value: http://gerrit.onap.org/r/aai
48         - name: HBASE_STARTUP_ARTIFICIAL_DELAY
49           value: "60"
50         volumeMounts:
51         - mountPath: /etc/localtime
52           name: localtime
53           readOnly: true
54         - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb
55           subPath: solo.rb
56           name: aai-chef-config
57         - mountPath: /var/chef/aai-data/environments/
58           name: aai-data
59         - mountPath: /var/log/onap
60           name: aai-resources-logs
61         - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml
62           name: aai-resources-log-conf
63           subPath: logback.xml
64         ports:
65         - containerPort: 8447
66         readinessProbe:
67           tcpSocket:
68             port: 8447
69           initialDelaySeconds: 5
70           periodSeconds: 10
71       - name: filebeat-onap-aai-resources
72         image: {{ .Values.image.filebeat }}
73         imagePullPolicy: {{ .Values.pullPolicy }}
74         volumeMounts:
75         - mountPath: /usr/share/filebeat/filebeat.yml
76           subPath: filebeat.yml
77           name: filebeat-conf
78         - mountPath: /var/log/onap
79           name: aai-resources-logs
80         - mountPath: /usr/share/filebeat/data
81           name: aai-resources-filebeat
82       volumes:
83       - name: localtime
84         hostPath:
85           path: /etc/localtime
86       - name: aai-chef-config
87         configMap:
88           name: aai-chef-config-configmap
89       - name: aai-data
90         configMap:
91           name: aai-resources-environments-configmap
92       - name: filebeat-conf
93         configMap:
94           name: aai-filebeat-configmap
95       - name: aai-resources-logs
96         emptyDir: {}
97       - name: aai-resources-filebeat
98         emptyDir: {}
99       - name: aai-resources-log-conf
100         configMap:
101          name: aai-resources-log-configmap
102       restartPolicy: Always
103       imagePullSecrets:
104       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
105 #{{ end }}