Run all components in one namespace
[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: portal-widgets
6   namespace: "{{ .Values.nsPrefix }}"
7 spec:
8   replicas: {{ .Values.portalWidgetsReplicas }}
9   selector:
10     matchLabels:
11       app: portalwidgets
12   template:
13     metadata:
14        labels:
15          app: portalwidgets
16        name: portal-widgets
17     spec:
18       initContainers:
19       - command:
20         - /root/ready.py
21         args:
22         - --container-name
23         - portaldb
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: portalapps-readiness
33       containers:
34       - image: {{ .Values.image.portalwms }}
35         imagePullPolicy: {{ .Values.pullPolicy }}
36         name: portalwidgets
37         volumeMounts:
38         - mountPath: /etc/localtime
39           name: localtime
40           readOnly: true
41         - mountPath: /application.properties
42           name: portalwidgets-application-properties
43           subPath: application.properties
44         ports:
45         - containerPort: 8082
46         readinessProbe:
47           tcpSocket:
48             port: 8082
49           initialDelaySeconds: 5
50           periodSeconds: 10
51       volumes:
52         - name: localtime
53           hostPath:
54             path: /etc/localtime
55         - name: portalwidgets-application-properties
56           configMap:
57             name: portal-onapwidgetms-configmap
58       imagePullSecrets:
59       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
60 #{{ end }}