blob: 536ac37396fc934b577a139b6ccc14d144fb8186 [file] [log] [blame]
#{{ 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:
labels:
app: vnc-portal
name: vnc-portal
namespace: "{{ .Values.nsPrefix }}-portal"
spec:
selector:
matchLabels:
app: vnc-portal
template:
metadata:
labels:
app: vnc-portal
name: vnc-portal
spec:
initContainers:
- command:
- /root/ready.py
args:
- --container-name
- portalapps
env:
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: {{ .Values.image.readiness }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vnc-portal-readiness
- command:
- /root/ready.py
args:
- --container-name
- pap
env:
- name: NAMESPACE
value: {{ .Values.nsPrefix }}-policy
image: {{ .Values.image.readiness }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vnc-pap-readiness
- command:
- /root/ready.py
args:
- --container-name
- sdc-fe
env:
- name: NAMESPACE
value: {{ .Values.nsPrefix }}-sdc
image: {{ .Values.image.readiness }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vnc-sdc-readiness
- command:
- /root/ready.py
args:
- --container-name
- vid-server
env:
- name: NAMESPACE
value: {{ .Values.nsPrefix }}-vid
image: {{ .Values.image.readiness }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vnc-vid-readiness
- command: ["/bin/sh","-c"]
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"]
image: {{ .Values.image.ubuntuInit }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vnc-init-hosts
volumeMounts:
- name: ubuntu-init
mountPath: /ubuntu-init/
containers:
- image: {{ .Values.image.ubuntuDesktop }}
imagePullPolicy: {{ .Values.pullPolicy }}
lifecycle:
postStart:
exec:
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
name: vnc-portal
volumeMounts:
- mountPath: /etc/localtime
name: localtime
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: {}
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: ubuntu-init
emptyDir: {}
- name: vnc-profiles-ini
configMap:
name: vnc-profiles-ini
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}