Merge "Update annotations to spec for aaf"
[oom.git] / kubernetes / portal / templates / portal-vnc-dep.yaml
1 #{{ if not .Values.disablePortalVncPortal }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: vnc-portal
7   name: vnc-portal
8   namespace: "{{ .Values.nsPrefix }}-portal"
9 spec:
10   selector:
11     matchLabels:
12       app: vnc-portal
13   template:
14     metadata:
15       labels:
16         app: vnc-portal
17       name: vnc-portal
18     spec:
19       initContainers:
20       - command:
21         - /root/ready.py
22         args:
23         - --container-name
24         - portalapps
25         env:
26         - name: NAMESPACE
27           valueFrom:
28             fieldRef:
29               apiVersion: v1
30               fieldPath: metadata.namespace
31         image: {{ .Values.image.readiness }}
32         imagePullPolicy: {{ .Values.pullPolicy }}
33         name: vnc-portal-readiness
34       - command:
35         - /root/ready.py
36         args:
37         - --container-name
38         - pap
39         env:
40         - name: NAMESPACE
41           value: {{ .Values.nsPrefix }}-policy
42         image: {{ .Values.image.readiness }}
43         imagePullPolicy: {{ .Values.pullPolicy }}
44         name: vnc-pap-readiness
45       - command:
46         - /root/ready.py
47         args:
48         - --container-name
49         - sdc-fe
50         env:
51         - name: NAMESPACE
52           value: {{ .Values.nsPrefix }}-sdc
53         image: {{ .Values.image.readiness }}
54         imagePullPolicy: {{ .Values.pullPolicy }}
55         name: vnc-sdc-readiness
56       - command:
57         - /root/ready.py
58         args:
59         - --container-name
60         - vid-server
61         env:
62         - name: NAMESPACE
63           value: {{ .Values.nsPrefix }}-vid
64         image: {{ .Values.image.readiness }}
65         imagePullPolicy: {{ .Values.pullPolicy }}
66         name: vnc-vid-readiness
67       - command: ["/bin/sh","-c"]
68         args: ["echo `host sdc-be.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.be.simpledemo.onap.org  >> /ubuntu-init/hosts; echo `host portalapps.{{ .Values.nsPrefix }}-portal | awk ''{print$4}''` portal.api.simpledemo.onap.org  >> /ubuntu-init/hosts; echo `host pap.{{ .Values.nsPrefix }}-policy | awk ''{print$4}''` policy.api.simpledemo.onap.org  >> /ubuntu-init/hosts; echo `host sdc-fe.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.simpledemo.onap.org  >> /ubuntu-init/hosts; echo `host vid-server.{{ .Values.nsPrefix }}-vid | awk ''{print$4}''` vid.api.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host sparky-be.{{ .Values.nsPrefix }}-aai | awk ''{print$4}''` aai.api.simpledemo.onap.org  >> /ubuntu-init/hosts"]
69         image: {{ .Values.image.ubuntuInit }}
70         imagePullPolicy: {{ .Values.pullPolicy }}
71         name: vnc-init-hosts
72         volumeMounts:
73         - name: ubuntu-init
74           mountPath: /ubuntu-init/
75       containers:
76       - image: {{ .Values.image.ubuntuDesktop }}
77         imagePullPolicy: {{ .Values.pullPolicy }}
78         lifecycle:
79           postStart:
80             exec:
81               command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"]
82         env:
83         - name: VNC_PASSWORD
84           value: password
85         name: vnc-portal
86         volumeMounts:
87         - mountPath: /etc/localtime
88           name: localtime
89           readOnly: true
90         - mountPath: /ubuntu-init/
91           name: ubuntu-init
92         securityContext:
93           privileged: true
94       securityContext: {}
95       volumes:
96         - name: localtime
97           hostPath:
98             path: /etc/localtime
99         - name: ubuntu-init
100           emptyDir: {}
101       imagePullSecrets:
102       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
103 #{{ end }}