blob: 536ac37396fc934b577a139b6ccc14d144fb8186 [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---
Mandeep Khindad6ea9872017-06-24 11:49:37 -04009apiVersion: extensions/v1beta1
10kind: Deployment
11metadata:
12 labels:
13 app: vnc-portal
14 name: vnc-portal
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000015 namespace: "{{ .Values.nsPrefix }}-portal"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016spec:
17 selector:
18 matchLabels:
19 app: vnc-portal
20 template:
21 metadata:
22 labels:
23 app: vnc-portal
24 name: vnc-portal
Mandeep Khindad6ea9872017-06-24 11:49:37 -040025 spec:
vasundhra6f620442017-11-22 12:26:25 +000026 initContainers:
27 - command:
28 - /root/ready.py
29 args:
30 - --container-name
31 - portalapps
32 env:
33 - name: NAMESPACE
34 valueFrom:
35 fieldRef:
36 apiVersion: v1
37 fieldPath: metadata.namespace
38 image: {{ .Values.image.readiness }}
39 imagePullPolicy: {{ .Values.pullPolicy }}
40 name: vnc-portal-readiness
41 - command:
42 - /root/ready.py
43 args:
44 - --container-name
45 - pap
46 env:
47 - name: NAMESPACE
48 value: {{ .Values.nsPrefix }}-policy
49 image: {{ .Values.image.readiness }}
50 imagePullPolicy: {{ .Values.pullPolicy }}
51 name: vnc-pap-readiness
52 - command:
53 - /root/ready.py
54 args:
55 - --container-name
56 - sdc-fe
57 env:
58 - name: NAMESPACE
59 value: {{ .Values.nsPrefix }}-sdc
60 image: {{ .Values.image.readiness }}
61 imagePullPolicy: {{ .Values.pullPolicy }}
62 name: vnc-sdc-readiness
63 - command:
64 - /root/ready.py
65 args:
66 - --container-name
67 - vid-server
68 env:
69 - name: NAMESPACE
70 value: {{ .Values.nsPrefix }}-vid
71 image: {{ .Values.image.readiness }}
72 imagePullPolicy: {{ .Values.pullPolicy }}
73 name: vnc-vid-readiness
74 - command: ["/bin/sh","-c"]
75 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"]
76 image: {{ .Values.image.ubuntuInit }}
77 imagePullPolicy: {{ .Values.pullPolicy }}
78 name: vnc-init-hosts
79 volumeMounts:
80 - name: ubuntu-init
81 mountPath: /ubuntu-init/
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:
yurynde049022017-12-21 14:31:21 +020088 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; cat /ubuntu-init/hosts >> /etc/hosts"]
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
Mandeep Khindad6ea9872017-06-24 11:49:37 -040097 - mountPath: /ubuntu-init/
98 name: ubuntu-init
yurynde049022017-12-21 14:31:21 +020099 - mountPath: /root/.init_profile/profiles.ini
100 name: vnc-profiles-ini
101 subPath: profiles.ini
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400102 securityContext:
103 privileged: true
104 securityContext: {}
105 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300106 - name: localtime
107 hostPath:
108 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400109 - name: ubuntu-init
110 emptyDir: {}
yurynde049022017-12-21 14:31:21 +0200111 - name: vnc-profiles-ini
112 configMap:
113 name: vnc-profiles-ini
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300114 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000115 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000116#{{ end }}