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 | --- |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 9 | apiVersion: v1 |
| 10 | kind: ConfigMap |
| 11 | metadata: |
| 12 | name: vnc-update-hosts |
| 13 | namespace: "{{ .Values.nsPrefix }}-portal" |
| 14 | data: |
| 15 | {{ (.Files.Glob "resources/scripts/update_hosts.sh").AsConfig | indent 2 }} |
| 16 | --- |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 17 | apiVersion: extensions/v1beta1 |
| 18 | kind: Deployment |
| 19 | metadata: |
| 20 | labels: |
| 21 | app: vnc-portal |
| 22 | name: vnc-portal |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 23 | namespace: "{{ .Values.nsPrefix }}-portal" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 24 | spec: |
| 25 | selector: |
| 26 | matchLabels: |
| 27 | app: vnc-portal |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: vnc-portal |
| 32 | name: vnc-portal |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 33 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 34 | initContainers: |
| 35 | - command: |
| 36 | - /root/ready.py |
| 37 | args: |
| 38 | - --container-name |
| 39 | - portalapps |
| 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | image: {{ .Values.image.readiness }} |
| 47 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 48 | name: vnc-portal-readiness |
| 49 | - command: |
| 50 | - /root/ready.py |
| 51 | args: |
| 52 | - --container-name |
| 53 | - pap |
| 54 | env: |
| 55 | - name: NAMESPACE |
| 56 | value: {{ .Values.nsPrefix }}-policy |
| 57 | image: {{ .Values.image.readiness }} |
| 58 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 59 | name: vnc-pap-readiness |
| 60 | - command: |
| 61 | - /root/ready.py |
| 62 | args: |
| 63 | - --container-name |
| 64 | - sdc-fe |
| 65 | env: |
| 66 | - name: NAMESPACE |
| 67 | value: {{ .Values.nsPrefix }}-sdc |
| 68 | image: {{ .Values.image.readiness }} |
| 69 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 70 | name: vnc-sdc-readiness |
| 71 | - command: |
| 72 | - /root/ready.py |
| 73 | args: |
| 74 | - --container-name |
| 75 | - vid-server |
| 76 | env: |
| 77 | - name: NAMESPACE |
| 78 | value: {{ .Values.nsPrefix }}-vid |
| 79 | image: {{ .Values.image.readiness }} |
| 80 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 81 | name: vnc-vid-readiness |
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: |
EC2 Default User | 99922db | 2018-01-19 08:23:50 +0000 | [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; (while true; do /tmp/update_hosts.sh sdc-be.{{ .Values.nsPrefix }}-sdc sdc.api.be.simpledemo.onap.org; /tmp/update_hosts.sh portalapps.{{ .Values.nsPrefix }}-portal portal.api.simpledemo.onap.org; /tmp/update_hosts.sh pap.{{ .Values.nsPrefix }}-policy policy.api.simpledemo.onap.org; /tmp/update_hosts.sh sdc-fe.{{ .Values.nsPrefix }}-sdc sdc.api.simpledemo.onap.org; /tmp/update_hosts.sh vid-server.{{ .Values.nsPrefix }}-vid vid.api.simpledemo.onap.org; /tmp/update_hosts.sh sparky-be.{{ .Values.nsPrefix }}-aai aai.api.simpledemo.onap.org; /tmp/update_hosts.sh cli.{{ .Values.nsPrefix }}-cli cli.api.simpledemo.onap.org; sleep 10; done) > update_hosts.log 2>&1 &"] |
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 |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 97 | - mountPath: /root/.init_profile/profiles.ini |
| 98 | name: vnc-profiles-ini |
| 99 | subPath: profiles.ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 100 | - mountPath: /tmp/update_hosts.sh |
| 101 | name: vnc-update-hosts |
| 102 | subPath: update_hosts.sh |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 103 | securityContext: |
| 104 | privileged: true |
| 105 | securityContext: {} |
| 106 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 107 | - name: localtime |
| 108 | hostPath: |
| 109 | path: /etc/localtime |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 110 | - name: vnc-profiles-ini |
| 111 | configMap: |
| 112 | name: vnc-profiles-ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 113 | - name: vnc-update-hosts |
| 114 | configMap: |
| 115 | name: vnc-update-hosts |
| 116 | defaultMode: 0755 |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 117 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 118 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 119 | #{{ end }} |