Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | labels: |
| 5 | app: vnc-portal |
| 6 | name: vnc-portal |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 7 | namespace: "{{ .Values.nsPrefix }}-portal" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 8 | spec: |
| 9 | selector: |
| 10 | matchLabels: |
| 11 | app: vnc-portal |
| 12 | template: |
| 13 | metadata: |
| 14 | labels: |
| 15 | app: vnc-portal |
| 16 | name: vnc-portal |
| 17 | annotations: |
| 18 | pod.beta.kubernetes.io/init-containers: '[ |
| 19 | { |
| 20 | "args": [ |
| 21 | "--container-name", |
| 22 | "portalapps" |
| 23 | ], |
| 24 | "command": [ |
| 25 | "/root/ready.py" |
| 26 | ], |
| 27 | "env": [ |
| 28 | { |
| 29 | "name": "NAMESPACE", |
| 30 | "valueFrom": { |
| 31 | "fieldRef": { |
| 32 | "apiVersion": "v1", |
| 33 | "fieldPath": "metadata.namespace" |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | ], |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 38 | "image": "{{ .Values.image.readiness }}", |
| 39 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 40 | "name": "vnc-portal-readiness" |
| 41 | }, |
| 42 | { |
| 43 | "args": [ |
| 44 | "--container-name", |
| 45 | "pap" |
| 46 | ], |
| 47 | "command": [ |
| 48 | "/root/ready.py" |
| 49 | ], |
| 50 | "env": [ |
| 51 | { |
| 52 | "name": "NAMESPACE", |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 53 | "value": "{{ .Values.nsPrefix }}-policy" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 54 | } |
| 55 | ], |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 56 | "image": "{{ .Values.image.readiness }}", |
| 57 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 58 | "name": "vnc-pap-readiness" |
| 59 | }, |
| 60 | { |
| 61 | "args": [ |
| 62 | "--container-name", |
| 63 | "sdc-fe" |
| 64 | ], |
| 65 | "command": [ |
| 66 | "/root/ready.py" |
| 67 | ], |
| 68 | "env": [ |
| 69 | { |
| 70 | "name": "NAMESPACE", |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 71 | "value": "{{ .Values.nsPrefix }}-sdc" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 72 | } |
| 73 | ], |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 74 | "image": "{{ .Values.image.readiness }}", |
| 75 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 76 | "name": "vnc-sdc-readiness" |
| 77 | }, |
| 78 | { |
| 79 | "args": [ |
| 80 | "--container-name", |
| 81 | "vid-server" |
| 82 | ], |
| 83 | "command": [ |
| 84 | "/root/ready.py" |
| 85 | ], |
| 86 | "env": [ |
| 87 | { |
| 88 | "name": "NAMESPACE", |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 89 | "value": "{{ .Values.nsPrefix }}-vid" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 90 | } |
| 91 | ], |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 92 | "image": "{{ .Values.image.readiness }}", |
| 93 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 94 | "name": "vnc-vid-readiness" |
| 95 | }, |
| 96 | { |
| 97 | "command": ["/bin/sh","-c"], |
Mandeep Khinda | 05844cc | 2017-09-05 18:29:41 +0000 | [diff] [blame] | 98 | "args": ["echo `host sdc-be.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.be.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host portalapps.{{ .Values.nsPrefix }}-portal | awk ''{print$4}''` portal.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host pap.{{ .Values.nsPrefix }}-policy | awk ''{print$4}''` policy.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host sdc-fe.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host vid-server.{{ .Values.nsPrefix }}-vid | awk ''{print$4}''` vid.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host sparky-be.{{ .Values.nsPrefix }}-aai | awk ''{print$4}''` aai.api.simpledemo.openecomp.org >> /ubuntu-init/hosts"], |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 99 | "image": "{{ .Values.image.ubuntuInit }}", |
| 100 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 101 | "name": "vnc-init-hosts", |
| 102 | "volumeMounts": [ |
| 103 | { |
| 104 | "name": "ubuntu-init", |
| 105 | "mountPath": "/ubuntu-init/" |
| 106 | } |
| 107 | ] |
| 108 | } |
| 109 | ]' |
| 110 | spec: |
| 111 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 112 | - image: {{ .Values.image.ubuntuDesktop }} |
| 113 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 114 | lifecycle: |
| 115 | postStart: |
| 116 | exec: |
| 117 | command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"] |
| 118 | env: |
| 119 | - name: VNC_PASSWORD |
| 120 | value: password |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 121 | name: vnc-portal |
| 122 | volumeMounts: |
| 123 | - mountPath: /ubuntu-init/ |
| 124 | name: ubuntu-init |
| 125 | securityContext: |
| 126 | privileged: true |
| 127 | securityContext: {} |
| 128 | volumes: |
| 129 | - name: ubuntu-init |
| 130 | emptyDir: {} |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 131 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 132 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |