onap on kubernetes source files
[oom.git] / kubernetes / portal / portal-vnc-dep.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   labels:
5     app: vnc-portal
6   name: vnc-portal
7 spec:
8   selector:
9     matchLabels:
10       app: vnc-portal
11   template:
12     metadata:
13       labels:
14         app: vnc-portal
15       name: vnc-portal
16       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "portalapps"
22               ],
23               "command": [
24                   "/root/ready.py"
25               ],
26               "env": [
27                   {
28                       "name": "NAMESPACE",
29                       "valueFrom": {
30                           "fieldRef": {
31                               "apiVersion": "v1",
32                               "fieldPath": "metadata.namespace"
33                           }
34                       }
35                   }
36               ],
37               "image": "oomk8s/readiness-check:1.0.0",
38               "imagePullPolicy": "Always",
39               "name": "vnc-portal-readiness"
40           },
41           {
42               "args": [
43                   "--container-name",
44                   "pap"
45               ],
46               "command": [
47                   "/root/ready.py"
48               ],
49               "env": [
50                   {
51                       "name": "NAMESPACE",
52                       "value": "onap-policy"
53                   }
54               ],
55               "image": "oomk8s/readiness-check:1.0.0",
56               "imagePullPolicy": "Always",
57               "name": "vnc-pap-readiness"
58           },
59           {
60               "args": [
61                   "--container-name",
62                   "sdc-fe"
63               ],
64               "command": [
65                   "/root/ready.py"
66               ],
67               "env": [
68                   {
69                       "name": "NAMESPACE",
70                       "value": "onap-sdc"
71                   }
72               ],
73               "image": "oomk8s/readiness-check:1.0.0",
74               "imagePullPolicy": "Always",
75               "name": "vnc-sdc-readiness"
76           },
77           {
78               "args": [
79                   "--container-name",
80                   "vid-server"
81               ],
82               "command": [
83                   "/root/ready.py"
84               ],
85               "env": [
86                   {
87                       "name": "NAMESPACE",
88                       "value": "onap-vid"
89                   }
90               ],
91               "image": "oomk8s/readiness-check:1.0.0",
92               "imagePullPolicy": "Always",
93               "name": "vnc-vid-readiness"
94           },
95           {
96               "command": ["/bin/sh","-c"],
97               "args": ["echo `host sdc-be.onap-sdc | awk ''{print$4}''` sdc.api.simpledemo.openecomp.org  >> /ubuntu-init/hosts; echo `host portalapps.onap-portal | awk ''{print$4}''` portal.api.simpledemo.openecomp.org  >> /ubuntu-init/hosts; echo `host pap.onap-policy | awk ''{print$4}''` policy.api.simpledemo.openecomp.org  >> /ubuntu-init/hosts; echo `host sdc-fe.onap-sdc | awk ''{print$4}''` sdc.ui.simpledemo.openecomp.org  >> /ubuntu-init/hosts; echo `host vid-server.onap-vid | awk ''{print$4}''` vid.api.simpledemo.openecomp.org >> /ubuntu-init/hosts"],
98               "image": "oomk8s/ubuntu-init:1.0.0",
99               "imagePullPolicy": "Always",
100               "name": "vnc-init-hosts",
101               "volumeMounts": [
102                 {
103                   "name": "ubuntu-init",
104                   "mountPath": "/ubuntu-init/"
105                 }
106               ]
107           }
108           ]'
109     spec:
110       containers:
111       - image: dorowu/ubuntu-desktop-lxde-vnc
112         lifecycle:
113           postStart:
114             exec:
115               command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"]
116         env:
117         - name: VNC_PASSWORD
118           value: password
119         imagePullPolicy: IfNotPresent
120         name: vnc-portal
121         volumeMounts:
122         - mountPath: /ubuntu-init/
123           name: ubuntu-init
124         securityContext:
125           privileged: true
126       securityContext: {}
127       volumes:
128         - name: ubuntu-init
129           emptyDir: {}