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: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 4 | name: portal-vnc-profiles-ini |
| 5 | namespace: "{{ .Values.nsPrefix }}" |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 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: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 12 | name: portal-vnc-update-hosts |
| 13 | namespace: "{{ .Values.nsPrefix }}" |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 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: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 21 | app: portal-vnc |
| 22 | name: portal-vnc |
| 23 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 24 | spec: |
vaibhav_16dec | 4930205 | 2018-02-15 10:00:06 +0000 | [diff] [blame] | 25 | replicas: {{ .Values.vncPortalReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 26 | selector: |
| 27 | matchLabels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 28 | app: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 29 | template: |
| 30 | metadata: |
| 31 | labels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 32 | app: portal-vnc |
| 33 | name: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 34 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 35 | initContainers: |
| 36 | - command: |
| 37 | - /root/ready.py |
| 38 | args: |
| 39 | - --container-name |
| 40 | - portalapps |
| 41 | env: |
| 42 | - name: NAMESPACE |
| 43 | valueFrom: |
| 44 | fieldRef: |
| 45 | apiVersion: v1 |
| 46 | fieldPath: metadata.namespace |
| 47 | image: {{ .Values.image.readiness }} |
| 48 | imagePullPolicy: {{ .Values.pullPolicy }} |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 49 | name: portal-vnc-readiness |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 50 | - command: |
| 51 | - /root/ready.py |
| 52 | args: |
| 53 | - --container-name |
| 54 | - pap |
| 55 | env: |
| 56 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 57 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 58 | image: {{ .Values.image.readiness }} |
| 59 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 60 | name: vnc-pap-readiness |
| 61 | - command: |
| 62 | - /root/ready.py |
| 63 | args: |
| 64 | - --container-name |
| 65 | - sdc-fe |
| 66 | env: |
| 67 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 68 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 69 | image: {{ .Values.image.readiness }} |
| 70 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 71 | name: vnc-sdc-readiness |
| 72 | - command: |
| 73 | - /root/ready.py |
| 74 | args: |
| 75 | - --container-name |
| 76 | - vid-server |
| 77 | env: |
| 78 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 79 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 80 | image: {{ .Values.image.readiness }} |
| 81 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 82 | name: vnc-vid-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 83 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 84 | - image: {{ .Values.image.ubuntuDesktop }} |
| 85 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 86 | lifecycle: |
| 87 | postStart: |
| 88 | exec: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 89 | 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.api.be.simpledemo.onap.org; /tmp/update_hosts.sh portalapps.{{ .Values.nsPrefix }} portal.api.simpledemo.onap.org; /tmp/update_hosts.sh pap.{{ .Values.nsPrefix }} policy.api.simpledemo.onap.org; /tmp/update_hosts.sh sdc-fe.{{ .Values.nsPrefix }} sdc.api.simpledemo.onap.org; /tmp/update_hosts.sh vid-server.{{ .Values.nsPrefix }} vid.api.simpledemo.onap.org; /tmp/update_hosts.sh sparky-be.{{ .Values.nsPrefix }} aai.api.simpledemo.onap.org; /tmp/update_hosts.sh cli.{{ .Values.nsPrefix }} 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] | 90 | env: |
| 91 | - name: VNC_PASSWORD |
| 92 | value: password |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 93 | name: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 94 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 95 | - mountPath: /etc/localtime |
| 96 | name: localtime |
| 97 | readOnly: true |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 98 | - mountPath: /root/.init_profile/profiles.ini |
| 99 | name: vnc-profiles-ini |
| 100 | subPath: profiles.ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 101 | - mountPath: /tmp/update_hosts.sh |
| 102 | name: vnc-update-hosts |
| 103 | subPath: update_hosts.sh |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 104 | securityContext: |
| 105 | privileged: true |
| 106 | securityContext: {} |
| 107 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 108 | - name: localtime |
| 109 | hostPath: |
| 110 | path: /etc/localtime |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 111 | - name: vnc-profiles-ini |
| 112 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 113 | name: portal-vnc-profiles-ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 114 | - name: vnc-update-hosts |
| 115 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 116 | name: portal-vnc-update-hosts |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 117 | defaultMode: 0755 |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 118 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 119 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 120 | #{{ end }} |