vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disablePortalVncPortal }} |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 16 | kind: ConfigMap |
| 17 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 18 | name: portal-vnc-profiles-ini |
| 19 | namespace: "{{ .Values.nsPrefix }}" |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 20 | data: |
| 21 | {{ (.Files.Glob "resources/vnc/init_profile/profiles.ini").AsConfig | indent 2 }} |
| 22 | --- |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 23 | apiVersion: v1 |
| 24 | kind: ConfigMap |
| 25 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 26 | name: portal-vnc-update-hosts |
| 27 | namespace: "{{ .Values.nsPrefix }}" |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 28 | data: |
| 29 | {{ (.Files.Glob "resources/scripts/update_hosts.sh").AsConfig | indent 2 }} |
| 30 | --- |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 31 | apiVersion: extensions/v1beta1 |
| 32 | kind: Deployment |
| 33 | metadata: |
| 34 | labels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 35 | app: portal-vnc |
| 36 | name: portal-vnc |
| 37 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 38 | spec: |
vaibhav_16dec | 4930205 | 2018-02-15 10:00:06 +0000 | [diff] [blame] | 39 | replicas: {{ .Values.vncPortalReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 40 | selector: |
| 41 | matchLabels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 42 | app: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 43 | template: |
| 44 | metadata: |
| 45 | labels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 46 | app: portal-vnc |
| 47 | name: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 48 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 49 | initContainers: |
| 50 | - command: |
| 51 | - /root/ready.py |
| 52 | args: |
| 53 | - --container-name |
| 54 | - portalapps |
| 55 | env: |
| 56 | - name: NAMESPACE |
| 57 | valueFrom: |
| 58 | fieldRef: |
| 59 | apiVersion: v1 |
| 60 | fieldPath: metadata.namespace |
| 61 | image: {{ .Values.image.readiness }} |
| 62 | imagePullPolicy: {{ .Values.pullPolicy }} |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 63 | name: portal-vnc-readiness |
Jerome Doucerain | 9d84e43 | 2018-03-17 14:33:18 -0400 | [diff] [blame^] | 64 | {{- if empty .Values.disablePolicyPap | not }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 65 | - command: |
| 66 | - /root/ready.py |
| 67 | args: |
| 68 | - --container-name |
| 69 | - pap |
| 70 | env: |
| 71 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 72 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 73 | image: {{ .Values.image.readiness }} |
| 74 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 75 | name: vnc-pap-readiness |
Jerome Doucerain | 9d84e43 | 2018-03-17 14:33:18 -0400 | [diff] [blame^] | 76 | {{- end }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 77 | - command: |
| 78 | - /root/ready.py |
| 79 | args: |
| 80 | - --container-name |
| 81 | - sdc-fe |
| 82 | env: |
| 83 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 84 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 85 | image: {{ .Values.image.readiness }} |
| 86 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 87 | name: vnc-sdc-readiness |
| 88 | - command: |
| 89 | - /root/ready.py |
| 90 | args: |
| 91 | - --container-name |
| 92 | - vid-server |
| 93 | env: |
| 94 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 95 | value: {{ .Values.nsPrefix }} |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 96 | image: {{ .Values.image.readiness }} |
| 97 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 98 | name: vnc-vid-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 99 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 100 | - image: {{ .Values.image.ubuntuDesktop }} |
| 101 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 102 | lifecycle: |
| 103 | postStart: |
| 104 | exec: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 105 | 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] | 106 | env: |
| 107 | - name: VNC_PASSWORD |
| 108 | value: password |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 109 | name: portal-vnc |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 110 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 111 | - mountPath: /etc/localtime |
| 112 | name: localtime |
| 113 | readOnly: true |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 114 | - mountPath: /root/.init_profile/profiles.ini |
| 115 | name: vnc-profiles-ini |
| 116 | subPath: profiles.ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 117 | - mountPath: /tmp/update_hosts.sh |
| 118 | name: vnc-update-hosts |
| 119 | subPath: update_hosts.sh |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 120 | securityContext: |
| 121 | privileged: true |
| 122 | securityContext: {} |
| 123 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 124 | - name: localtime |
| 125 | hostPath: |
| 126 | path: /etc/localtime |
yuryn | de04902 | 2017-12-21 14:31:21 +0200 | [diff] [blame] | 127 | - name: vnc-profiles-ini |
| 128 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 129 | name: portal-vnc-profiles-ini |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 130 | - name: vnc-update-hosts |
| 131 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 132 | name: portal-vnc-update-hosts |
yuryn | d9f6ecd | 2017-11-09 20:07:02 +0200 | [diff] [blame] | 133 | defaultMode: 0755 |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 134 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 135 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 136 | #{{ end }} |
Jerome Doucerain | 9d84e43 | 2018-03-17 14:33:18 -0400 | [diff] [blame^] | 137 | |