blob: 3a80572238b3dea41daf3e74d3599efbea58bd83 [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:
vaibhav_16dec49302052018-02-15 10:00:06 +000025 replicas: {{ .Values.vncPortalReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040026 selector:
27 matchLabels:
28 app: vnc-portal
29 template:
30 metadata:
31 labels:
32 app: vnc-portal
33 name: vnc-portal
Mandeep Khindad6ea9872017-06-24 11:49:37 -040034 spec:
vasundhra6f620442017-11-22 12:26:25 +000035 initContainers:
36 - command:
37 - /root/ready.py
38 args:
39 - --container-name
40 - portalapps
41 env:
42 - name: NAMESPACE
43 valueFrom:
44 fieldRef:
45 apiVersion: v1
46 fieldPath: metadata.namespace
47 image: {{ .Values.image.readiness }}
48 imagePullPolicy: {{ .Values.pullPolicy }}
49 name: vnc-portal-readiness
50 - command:
51 - /root/ready.py
52 args:
53 - --container-name
54 - pap
55 env:
56 - name: NAMESPACE
57 value: {{ .Values.nsPrefix }}-policy
58 image: {{ .Values.image.readiness }}
59 imagePullPolicy: {{ .Values.pullPolicy }}
60 name: vnc-pap-readiness
61 - command:
62 - /root/ready.py
63 args:
64 - --container-name
65 - sdc-fe
66 env:
67 - name: NAMESPACE
68 value: {{ .Values.nsPrefix }}-sdc
69 image: {{ .Values.image.readiness }}
70 imagePullPolicy: {{ .Values.pullPolicy }}
71 name: vnc-sdc-readiness
72 - command:
73 - /root/ready.py
74 args:
75 - --container-name
76 - vid-server
77 env:
78 - name: NAMESPACE
79 value: {{ .Values.nsPrefix }}-vid
80 image: {{ .Values.image.readiness }}
81 imagePullPolicy: {{ .Values.pullPolicy }}
82 name: vnc-vid-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040083 containers:
kerenjcbac0102017-08-23 10:22:33 +000084 - image: {{ .Values.image.ubuntuDesktop }}
85 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040086 lifecycle:
87 postStart:
88 exec:
EC2 Default User99922db2018-01-19 08:23:50 +000089 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 -040090 env:
91 - name: VNC_PASSWORD
92 value: password
Mandeep Khindad6ea9872017-06-24 11:49:37 -040093 name: vnc-portal
94 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030095 - mountPath: /etc/localtime
96 name: localtime
97 readOnly: true
yurynde049022017-12-21 14:31:21 +020098 - mountPath: /root/.init_profile/profiles.ini
99 name: vnc-profiles-ini
100 subPath: profiles.ini
yurynd9f6ecd2017-11-09 20:07:02 +0200101 - mountPath: /tmp/update_hosts.sh
102 name: vnc-update-hosts
103 subPath: update_hosts.sh
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400104 securityContext:
105 privileged: true
106 securityContext: {}
107 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300108 - name: localtime
109 hostPath:
110 path: /etc/localtime
yurynde049022017-12-21 14:31:21 +0200111 - name: vnc-profiles-ini
112 configMap:
113 name: vnc-profiles-ini
yurynd9f6ecd2017-11-09 20:07:02 +0200114 - name: vnc-update-hosts
115 configMap:
116 name: vnc-update-hosts
117 defaultMode: 0755
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300118 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000119 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000120#{{ end }}