aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/templates/portal-vnc-dep.yaml
diff options
context:
space:
mode:
authorkerenj <keren.joseph@amdocs.com>2017-08-23 10:22:33 +0000
committerkerenj <keren.joseph@amdocs.com>2017-08-24 10:31:13 +0000
commitcbac010dec8633718531423ebe4e3ede0005d36f (patch)
tree76a6f0d535dbb102bd3775bb2a820ac2251d1ec4 /kubernetes/portal/templates/portal-vnc-dep.yaml
parentfc2caa6c458c77e10e738a8e9af058d222ac9405 (diff)
portal K8S-Helm Parameterization
changed portal k8s deployment to support helm parameterization Issue-ID: OOM-52 Change-Id: I8ad9681b597a87113089f194e1a0e8a9e550bb08 Signed-off-by: kerenj <keren.joseph@amdocs.com>
Diffstat (limited to 'kubernetes/portal/templates/portal-vnc-dep.yaml')
-rw-r--r--kubernetes/portal/templates/portal-vnc-dep.yaml133
1 files changed, 133 insertions, 0 deletions
diff --git a/kubernetes/portal/templates/portal-vnc-dep.yaml b/kubernetes/portal/templates/portal-vnc-dep.yaml
new file mode 100644
index 0000000000..e4a8574458
--- /dev/null
+++ b/kubernetes/portal/templates/portal-vnc-dep.yaml
@@ -0,0 +1,133 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ labels:
+ app: vnc-portal
+ name: vnc-portal
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: vnc-portal
+ template:
+ metadata:
+ labels:
+ app: vnc-portal
+ name: vnc-portal
+ annotations:
+ pod.beta.kubernetes.io/init-containers: '[
+ {
+ "args": [
+ "--container-name",
+ "portalapps"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "apiVersion": "v1",
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-portal-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "pap"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-policy"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-pap-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "sdc-fe"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-sdc"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-sdc-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "vid-server"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-vid"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-vid-readiness"
+ },
+ {
+ "command": ["/bin/sh","-c"],
+ "args": ["echo `host sdc-be.onap-sdc | awk ''{print$4}''` sdc.api.be.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; echo `host sparky-fe.onap-aai | awk ''{print$4}''` aai.api.simpledemo.openecomp.org >> /ubuntu-init/hosts"],
+ "image": "{{ .Values.image.ubuntuInit }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-init-hosts",
+ "volumeMounts": [
+ {
+ "name": "ubuntu-init",
+ "mountPath": "/ubuntu-init/"
+ }
+ ]
+ }
+ ]'
+ spec:
+ containers:
+ - image: {{ .Values.image.ubuntuDesktop }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ lifecycle:
+ postStart:
+ exec:
+ command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"]
+ env:
+ - name: VNC_PASSWORD
+ value: password
+ imagePullPolicy: IfNotPresent
+ name: vnc-portal
+ volumeMounts:
+ - mountPath: /ubuntu-init/
+ name: ubuntu-init
+ securityContext:
+ privileged: true
+ securityContext: {}
+ volumes:
+ - name: ubuntu-init
+ emptyDir: {}
+ imagePullSecrets:
+ - name: onap-docker-registry-key