VID K8S-Helm Parameterization
changed VID k8s deployment to support helm parameterization
Issue-ID: OOM-52
Change-Id: Ide19bfaa611dfbff8080bd755b6dc820d3691894
y
Signed-off-by: kerenj <keren.joseph@amdocs.com>
diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash
index e57f748..384005b 100644
--- a/kubernetes/oneclick/setenv.bash
+++ b/kubernetes/oneclick/setenv.bash
@@ -1,7 +1,7 @@
#!/bin/bash
-HELM_APPS=('mso' 'message-router' 'sdnc')
-ONAP_APPS=('sdc' 'aai' 'robot' 'vid' 'portal' 'policy' 'appc')
+HELM_APPS=('mso' 'message-router' 'sdnc' 'vid')
+ONAP_APPS=('sdc' 'aai' 'robot' 'portal' 'policy' 'appc')
ONAP_DOCKER_REGISTRY_KEY=${ONAP_DOCKER_REGISTRY_KEY:-onap-docker-registry-key}
ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001}
ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker}
diff --git a/kubernetes/vid/Chart.yaml b/kubernetes/vid/Chart.yaml
new file mode 100644
index 0000000..68b43f4
--- /dev/null
+++ b/kubernetes/vid/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: vid
+version: 0.1.0
diff --git a/kubernetes/vid/all-services.yaml b/kubernetes/vid/templates/all-services.yaml
similarity index 85%
rename from kubernetes/vid/all-services.yaml
rename to kubernetes/vid/templates/all-services.yaml
index 4b5b082..1018ded 100644
--- a/kubernetes/vid/all-services.yaml
+++ b/kubernetes/vid/templates/all-services.yaml
@@ -2,6 +2,7 @@
kind: Service
metadata:
name: vid-mariadb
+ namespace: {{ .Values.NS }}
spec:
ports:
- name: vid-mariadb
@@ -16,6 +17,7 @@
labels:
app: vid-server
name: vid-server
+ namespace: {{ .Values.NS }}
spec:
ports:
- name: vid-server
diff --git a/kubernetes/vid/vid-mariadb-deployment.yaml b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
similarity index 79%
rename from kubernetes/vid/vid-mariadb-deployment.yaml
rename to kubernetes/vid/templates/vid-mariadb-deployment.yaml
index c34bce9..cf3b8a2 100644
--- a/kubernetes/vid/vid-mariadb-deployment.yaml
+++ b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
@@ -4,6 +4,7 @@
labels:
app: vid-mariadb
name: vid-mariadb
+ namespace: {{ .Values.NS }}
spec:
selector:
matchLabels:
@@ -15,7 +16,8 @@
name: vid-mariadb
spec:
containers:
- - image: nexus3.onap.org:10001/library/mariadb:10
+ - image: {{ .Values.image.mariadb }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: vid-mariadb
env:
- name: MYSQL_DATABASE
@@ -43,12 +45,12 @@
volumes:
- name: vid-mariadb-data
hostPath:
- path: /dockerdata-nfs/onapdemo/vid/mariadb/data
+ path: /dockerdata-nfs/onap/vid/mariadb/data
- name: vid-pre-init
hostPath:
- path: /dockerdata-nfs/onapdemo/vid/vid/lf_config/vid-pre-init.sql
+ path: /dockerdata-nfs/onap/vid/vid/lf_config/vid-pre-init.sql
- name: my-cnf
hostPath:
- path: /dockerdata-nfs/onapdemo/vid/vid/lf_config/vid-my.cnf
+ path: /dockerdata-nfs/onap/vid/vid/lf_config/vid-my.cnf
imagePullSecrets:
- name: onap-docker-registry-key
diff --git a/kubernetes/vid/vid-server-deployment.yaml b/kubernetes/vid/templates/vid-server-deployment.yaml
similarity index 92%
rename from kubernetes/vid/vid-server-deployment.yaml
rename to kubernetes/vid/templates/vid-server-deployment.yaml
index 5028297..58ce80b 100644
--- a/kubernetes/vid/vid-server-deployment.yaml
+++ b/kubernetes/vid/templates/vid-server-deployment.yaml
@@ -4,6 +4,7 @@
labels:
app: vid-server
name: vid-server
+ namespace: {{ .Values.NS }}
spec:
selector:
matchLabels:
@@ -34,8 +35,8 @@
}
}
],
- "image": "oomk8s/readiness-check:1.0.0",
- "imagePullPolicy": "Always",
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
"name": "vid-server-readiness"
}
]'
@@ -82,7 +83,8 @@
value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- name: VID_MYSQL_MAXCONNECTIONS
value: "5"
- image: nexus3.onap.org:10001/openecomp/vid:1.1-STAGING-latest
+ image: {{ .Values.image.vid }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: vid-server
ports:
- containerPort: 8080
diff --git a/kubernetes/vid/values.yaml b/kubernetes/vid/values.yaml
new file mode 100644
index 0000000..a8d7a5b
--- /dev/null
+++ b/kubernetes/vid/values.yaml
@@ -0,0 +1,6 @@
+NS: onap-vid
+pullPolicy: IfNotPresent
+image:
+ readiness: oomk8s/readiness-check:1.0.0
+ mariadb: mariadb:10
+ vid: nexus3.onap.org:10001/openecomp/vid:1.1-STAGING-latest