yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disablePortalVncPortal }} |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame^] | 2 | kind: ConfigMap |
| 3 | metadata: |
| 4 | name: vnc-profiles-ini |
| 5 | namespace: "{{ .Values.nsPrefix }}-portal" |
| 6 | data: |
| 7 | {{ (.Files.Glob "resources/vnc/init_profile/profiles.ini").AsConfig | indent 2 }} |
| 8 | --- |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 9 | apiVersion: extensions/v1beta1 |
| 10 | kind: Deployment |
| 11 | metadata: |
| 12 | labels: |
| 13 | app: vnc-portal |
| 14 | name: vnc-portal |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 15 | namespace: "{{ .Values.nsPrefix }}-portal" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | spec: |
| 17 | selector: |
| 18 | matchLabels: |
| 19 | app: vnc-portal |
| 20 | template: |
| 21 | metadata: |
| 22 | labels: |
| 23 | app: vnc-portal |
| 24 | name: vnc-portal |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 25 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 26 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 82 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 83 | - image: {{ .Values.image.ubuntuDesktop }} |
| 84 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 85 | lifecycle: |
| 86 | postStart: |
| 87 | exec: |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame^] | 88 | 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 89 | env: |
| 90 | - name: VNC_PASSWORD |
| 91 | value: password |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 92 | name: vnc-portal |
| 93 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 94 | - mountPath: /etc/localtime |
| 95 | name: localtime |
| 96 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 97 | - mountPath: /ubuntu-init/ |
| 98 | name: ubuntu-init |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame^] | 99 | - mountPath: /root/.init_profile/profiles.ini |
| 100 | name: vnc-profiles-ini |
| 101 | subPath: profiles.ini |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 102 | securityContext: |
| 103 | privileged: true |
| 104 | securityContext: {} |
| 105 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 106 | - name: localtime |
| 107 | hostPath: |
| 108 | path: /etc/localtime |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 109 | - name: ubuntu-init |
| 110 | emptyDir: {} |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame^] | 111 | - name: vnc-profiles-ini |
| 112 | configMap: |
| 113 | name: vnc-profiles-ini |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 114 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 115 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 116 | #{{ end }} |