blob: 0680a8ab24e1f50fa3dc44ee0025cb35162c13da [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePortalVncPortal }}
yurynde049022017-12-21 14:31:21 +02002kind: ConfigMap
3metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +00004 name: portal-vnc-profiles-ini
5 namespace: "{{ .Values.nsPrefix }}"
yurynde049022017-12-21 14:31:21 +02006data:
7{{ (.Files.Glob "resources/vnc/init_profile/profiles.ini").AsConfig | indent 2 }}
8---
yurynd9f6ecd2017-11-09 20:07:02 +02009apiVersion: v1
10kind: ConfigMap
11metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +000012 name: portal-vnc-update-hosts
13 namespace: "{{ .Values.nsPrefix }}"
yurynd9f6ecd2017-11-09 20:07:02 +020014data:
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:
BorislavG8bfc6cf2018-02-27 15:04:26 +000021 app: portal-vnc
22 name: portal-vnc
23 namespace: "{{ .Values.nsPrefix }}"
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:
BorislavG8bfc6cf2018-02-27 15:04:26 +000028 app: portal-vnc
Mandeep Khindad6ea9872017-06-24 11:49:37 -040029 template:
30 metadata:
31 labels:
BorislavG8bfc6cf2018-02-27 15:04:26 +000032 app: portal-vnc
33 name: portal-vnc
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 }}
BorislavG8bfc6cf2018-02-27 15:04:26 +000049 name: portal-vnc-readiness
vasundhra6f620442017-11-22 12:26:25 +000050 - command:
51 - /root/ready.py
52 args:
53 - --container-name
54 - pap
55 env:
56 - name: NAMESPACE
BorislavG8bfc6cf2018-02-27 15:04:26 +000057 value: {{ .Values.nsPrefix }}
vasundhra6f620442017-11-22 12:26:25 +000058 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
BorislavG8bfc6cf2018-02-27 15:04:26 +000068 value: {{ .Values.nsPrefix }}
vasundhra6f620442017-11-22 12:26:25 +000069 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
BorislavG8bfc6cf2018-02-27 15:04:26 +000079 value: {{ .Values.nsPrefix }}
vasundhra6f620442017-11-22 12:26:25 +000080 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:
BorislavG8bfc6cf2018-02-27 15:04:26 +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.api.be.simpledemo.onap.org; /tmp/update_hosts.sh portalapps.{{ .Values.nsPrefix }} portal.api.simpledemo.onap.org; /tmp/update_hosts.sh pap.{{ .Values.nsPrefix }} policy.api.simpledemo.onap.org; /tmp/update_hosts.sh sdc-fe.{{ .Values.nsPrefix }} sdc.api.simpledemo.onap.org; /tmp/update_hosts.sh vid-server.{{ .Values.nsPrefix }} vid.api.simpledemo.onap.org; /tmp/update_hosts.sh sparky-be.{{ .Values.nsPrefix }} aai.api.simpledemo.onap.org; /tmp/update_hosts.sh cli.{{ .Values.nsPrefix }} 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
BorislavG8bfc6cf2018-02-27 15:04:26 +000093 name: portal-vnc
Mandeep Khindad6ea9872017-06-24 11:49:37 -040094 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:
BorislavG8bfc6cf2018-02-27 15:04:26 +0000113 name: portal-vnc-profiles-ini
yurynd9f6ecd2017-11-09 20:07:02 +0200114 - name: vnc-update-hosts
115 configMap:
BorislavG8bfc6cf2018-02-27 15:04:26 +0000116 name: portal-vnc-update-hosts
yurynd9f6ecd2017-11-09 20:07:02 +0200117 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 }}