blob: d5f433816e12c2b114844833a465501a146b818d [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePortalVncPortal }}
yurynde049022017-12-21 14:31:21 +02002kind: ConfigMap
3metadata:
4 name: vnc-profiles-ini
5 namespace: "{{ .Values.nsPrefix }}-portal"
6data:
7{{ (.Files.Glob "resources/vnc/init_profile/profiles.ini").AsConfig | indent 2 }}
8---
yurynd9f6ecd2017-11-09 20:07:02 +02009apiVersion: v1
10kind: ConfigMap
11metadata:
12 name: vnc-update-hosts
13 namespace: "{{ .Values.nsPrefix }}-portal"
14data:
15{{ (.Files.Glob "resources/scripts/update_hosts.sh").AsConfig | indent 2 }}
16---
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017apiVersion: extensions/v1beta1
18kind: Deployment
19metadata:
20 labels:
21 app: vnc-portal
22 name: vnc-portal
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000023 namespace: "{{ .Values.nsPrefix }}-portal"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040024spec:
25 selector:
26 matchLabels:
27 app: vnc-portal
28 template:
29 metadata:
30 labels:
31 app: vnc-portal
32 name: vnc-portal
Mandeep Khindad6ea9872017-06-24 11:49:37 -040033 spec:
vasundhra6f620442017-11-22 12:26:25 +000034 initContainers:
35 - command:
36 - /root/ready.py
37 args:
38 - --container-name
39 - portalapps
40 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 image: {{ .Values.image.readiness }}
47 imagePullPolicy: {{ .Values.pullPolicy }}
48 name: vnc-portal-readiness
49 - command:
50 - /root/ready.py
51 args:
52 - --container-name
53 - pap
54 env:
55 - name: NAMESPACE
56 value: {{ .Values.nsPrefix }}-policy
57 image: {{ .Values.image.readiness }}
58 imagePullPolicy: {{ .Values.pullPolicy }}
59 name: vnc-pap-readiness
60 - command:
61 - /root/ready.py
62 args:
63 - --container-name
64 - sdc-fe
65 env:
66 - name: NAMESPACE
67 value: {{ .Values.nsPrefix }}-sdc
68 image: {{ .Values.image.readiness }}
69 imagePullPolicy: {{ .Values.pullPolicy }}
70 name: vnc-sdc-readiness
71 - command:
72 - /root/ready.py
73 args:
74 - --container-name
75 - vid-server
76 env:
77 - name: NAMESPACE
78 value: {{ .Values.nsPrefix }}-vid
79 image: {{ .Values.image.readiness }}
80 imagePullPolicy: {{ .Values.pullPolicy }}
81 name: vnc-vid-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 containers:
kerenjcbac0102017-08-23 10:22:33 +000083 - image: {{ .Values.image.ubuntuDesktop }}
84 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040085 lifecycle:
86 postStart:
87 exec:
EC2 Default User99922db2018-01-19 08:23:50 +000088 command: ["/bin/sh", "-c", "mkdir -p /root/.mozilla/firefox/onap.default; cp /root/.init_profile/profiles.ini /root/.mozilla/firefox/; echo 'user_pref(\"browser.tabs.remote.autostart.2\", false);' > /root/.mozilla/firefox/onap.default/prefs.js; (while true; do /tmp/update_hosts.sh sdc-be.{{ .Values.nsPrefix }}-sdc sdc.api.be.simpledemo.onap.org; /tmp/update_hosts.sh portalapps.{{ .Values.nsPrefix }}-portal portal.api.simpledemo.onap.org; /tmp/update_hosts.sh pap.{{ .Values.nsPrefix }}-policy policy.api.simpledemo.onap.org; /tmp/update_hosts.sh sdc-fe.{{ .Values.nsPrefix }}-sdc sdc.api.simpledemo.onap.org; /tmp/update_hosts.sh vid-server.{{ .Values.nsPrefix }}-vid vid.api.simpledemo.onap.org; /tmp/update_hosts.sh sparky-be.{{ .Values.nsPrefix }}-aai aai.api.simpledemo.onap.org; /tmp/update_hosts.sh cli.{{ .Values.nsPrefix }}-cli cli.api.simpledemo.onap.org; sleep 10; done) > update_hosts.log 2>&1 &"]
Mandeep Khindad6ea9872017-06-24 11:49:37 -040089 env:
90 - name: VNC_PASSWORD
91 value: password
Mandeep Khindad6ea9872017-06-24 11:49:37 -040092 name: vnc-portal
93 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030094 - mountPath: /etc/localtime
95 name: localtime
96 readOnly: true
yurynde049022017-12-21 14:31:21 +020097 - mountPath: /root/.init_profile/profiles.ini
98 name: vnc-profiles-ini
99 subPath: profiles.ini
yurynd9f6ecd2017-11-09 20:07:02 +0200100 - mountPath: /tmp/update_hosts.sh
101 name: vnc-update-hosts
102 subPath: update_hosts.sh
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400103 securityContext:
104 privileged: true
105 securityContext: {}
106 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300107 - name: localtime
108 hostPath:
109 path: /etc/localtime
yurynde049022017-12-21 14:31:21 +0200110 - name: vnc-profiles-ini
111 configMap:
112 name: vnc-profiles-ini
yurynd9f6ecd2017-11-09 20:07:02 +0200113 - name: vnc-update-hosts
114 configMap:
115 name: vnc-update-hosts
116 defaultMode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300117 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000118 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000119#{{ end }}