blob: 01ef02b3b4a909f3f62aaa664c253a2b9e1fa31e [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 labels:
5 app: vnc-portal
6 name: vnc-portal
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00007 namespace: "{{ .Values.nsPrefix }}-portal"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04008spec:
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 ],
kerenjcbac0102017-08-23 10:22:33 +000038 "image": "{{ .Values.image.readiness }}",
39 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040040 "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 Khinda0e8f8892017-08-25 03:31:17 +000053 "value": "{{ .Values.nsPrefix }}-policy"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 }
55 ],
kerenjcbac0102017-08-23 10:22:33 +000056 "image": "{{ .Values.image.readiness }}",
57 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040058 "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 Khinda0e8f8892017-08-25 03:31:17 +000071 "value": "{{ .Values.nsPrefix }}-sdc"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 }
73 ],
kerenjcbac0102017-08-23 10:22:33 +000074 "image": "{{ .Values.image.readiness }}",
75 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040076 "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 Khinda0e8f8892017-08-25 03:31:17 +000089 "value": "{{ .Values.nsPrefix }}-vid"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040090 }
91 ],
kerenjcbac0102017-08-23 10:22:33 +000092 "image": "{{ .Values.image.readiness }}",
93 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040094 "name": "vnc-vid-readiness"
95 },
96 {
97 "command": ["/bin/sh","-c"],
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000098 "args": ["echo `host sdc-be.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.be.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host portalapps.{{ .Values.nsPrefix }}-portal | awk ''{print$4}''` portal.api.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host pap.{{ .Values.nsPrefix }}-policy | awk ''{print$4}''` policy.api.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host sdc-fe.{{ .Values.nsPrefix }}-sdc | awk ''{print$4}''` sdc.api.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host vid-server.{{ .Values.nsPrefix }}-vid | awk ''{print$4}''` vid.api.simpledemo.onap.org >> /ubuntu-init/hosts; echo `host sparky-be.{{ .Values.nsPrefix }}-aai | awk ''{print$4}''` aai.api.simpledemo.onap.org >> /ubuntu-init/hosts"],
kerenjcbac0102017-08-23 10:22:33 +000099 "image": "{{ .Values.image.ubuntuInit }}",
100 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400101 "name": "vnc-init-hosts",
102 "volumeMounts": [
103 {
104 "name": "ubuntu-init",
105 "mountPath": "/ubuntu-init/"
106 }
107 ]
108 }
109 ]'
110 spec:
111 containers:
kerenjcbac0102017-08-23 10:22:33 +0000112 - image: {{ .Values.image.ubuntuDesktop }}
113 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400114 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 Khindad6ea9872017-06-24 11:49:37 -0400121 name: vnc-portal
122 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +0300123 - mountPath: /etc/localtime
124 name: localtime
125 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400126 - mountPath: /ubuntu-init/
127 name: ubuntu-init
128 securityContext:
129 privileged: true
130 securityContext: {}
131 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300132 - name: localtime
133 hostPath:
134 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400135 - name: ubuntu-init
136 emptyDir: {}
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300137 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000138 - name: "{{ .Values.nsPrefix }}-docker-registry-key"