From cb02aa241edd97acb6c5ca744de84313f53e8a5a Mon Sep 17 00:00:00 2001 From: yuryn Date: Thu, 21 Dec 2017 14:31:21 +0200 Subject: Fix firefox tab crashes in VNC Change-Id: Ie295257d98ddf32693309535e15c6ad9529f10fc Issue-ID: OOM-531 Signed-off-by: yuryn --- kubernetes/portal/resources/vnc/init_profile/profiles.ini | 9 +++++++++ kubernetes/portal/templates/portal-vnc-dep.yaml | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 kubernetes/portal/resources/vnc/init_profile/profiles.ini diff --git a/kubernetes/portal/resources/vnc/init_profile/profiles.ini b/kubernetes/portal/resources/vnc/init_profile/profiles.ini new file mode 100644 index 0000000000..7a1330fb4d --- /dev/null +++ b/kubernetes/portal/resources/vnc/init_profile/profiles.ini @@ -0,0 +1,9 @@ +[General] +StartWithLastProfile=1 + +[Profile0] +Name=default +IsRelative=1 +Path=onap.default +Default=1 + diff --git a/kubernetes/portal/templates/portal-vnc-dep.yaml b/kubernetes/portal/templates/portal-vnc-dep.yaml index b4a9effe59..005148ab38 100644 --- a/kubernetes/portal/templates/portal-vnc-dep.yaml +++ b/kubernetes/portal/templates/portal-vnc-dep.yaml @@ -1,4 +1,11 @@ #{{ if not .Values.disablePortalVncPortal }} +kind: ConfigMap +metadata: + name: vnc-profiles-ini + namespace: "{{ .Values.nsPrefix }}-portal" +data: +{{ (.Files.Glob "resources/vnc/init_profile/profiles.ini").AsConfig | indent 2 }} +--- apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -115,7 +122,7 @@ spec: lifecycle: postStart: exec: - command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"] + 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"] env: - name: VNC_PASSWORD value: password @@ -126,6 +133,9 @@ spec: readOnly: true - mountPath: /ubuntu-init/ name: ubuntu-init + - mountPath: /root/.init_profile/profiles.ini + name: vnc-profiles-ini + subPath: profiles.ini securityContext: privileged: true securityContext: {} @@ -135,6 +145,9 @@ spec: path: /etc/localtime - name: ubuntu-init emptyDir: {} + - name: vnc-profiles-ini + configMap: + name: vnc-profiles-ini imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} \ No newline at end of file -- cgit 1.2.3-korg