Merge "Update annotations to spec for sdc"
[oom.git] / kubernetes / portal / templates / portal-widgets-deployment.yaml
1 #{{ if not .Values.disablePortalPortalwidgets }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: portalwidgets
6   namespace: "{{ .Values.nsPrefix }}-portal"
7 spec:
8   selector:
9     matchLabels:
10       app: portalwidgets
11   template:
12     metadata:
13        labels:
14          app: portalwidgets
15        name: portalwidgets
16     spec:
17       initContainers:
18       - command:
19         - /root/ready.py
20         args:
21         - --container-name
22         - portaldb
23         env:
24         - name: NAMESPACE
25           valueFrom:
26             fieldRef:
27               apiVersion: v1
28               fieldPath: metadata.namespace
29         image: {{ .Values.image.readiness }}
30         imagePullPolicy: {{ .Values.pullPolicy }}
31         name: portalapps-readiness
32       containers:
33       - image: {{ .Values.image.portalwms }}
34         imagePullPolicy: {{ .Values.pullPolicy }} 
35         name: portalwidgets
36         volumeMounts:
37         - mountPath: /etc/localtime
38           name: localtime
39           readOnly: true
40         - mountPath: /application.properties
41           name: portalwidgets-application-properties
42         ports:
43         - containerPort: 8082
44         readinessProbe:
45           tcpSocket:
46             port: 8082
47           initialDelaySeconds: 5
48           periodSeconds: 10
49       volumes:
50         - name: localtime
51           hostPath:
52             path: /etc/localtime
53         - name: portalwidgets-application-properties
54           hostPath:
55             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties
56       imagePullSecrets:
57       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
58 #{{ end }}