sdnc K8S-Helm Parameterization
changed sdnc k8s deployment to support helm parameterization. updated image to 1.1
Issue-ID: OOM-52
Change-Id: Ie9ec8f60c80caffc69637bf83043902eef45dc18
Signed-off-by: kerenj <keren.joseph@amdocs.com>
diff --git a/kubernetes/oneclick/setenv.bash b/kubernetes/oneclick/setenv.bash
index aaaffea..e57f748 100644
--- a/kubernetes/oneclick/setenv.bash
+++ b/kubernetes/oneclick/setenv.bash
@@ -1,7 +1,7 @@
#!/bin/bash
-HELM_APPS=('mso' 'message-router')
-ONAP_APPS=('sdc' 'aai' 'robot' 'vid' 'sdnc' 'portal' 'policy' 'appc')
+HELM_APPS=('mso' 'message-router' 'sdnc')
+ONAP_APPS=('sdc' 'aai' 'robot' 'vid' '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/sdnc/Chart.yaml b/kubernetes/sdnc/Chart.yaml
new file mode 100644
index 0000000..2daeef2
--- /dev/null
+++ b/kubernetes/sdnc/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: sdnc
+version: 0.1.0
diff --git a/kubernetes/sdnc/all-services.yaml b/kubernetes/sdnc/templates/all-services.yaml
similarity index 86%
rename from kubernetes/sdnc/all-services.yaml
rename to kubernetes/sdnc/templates/all-services.yaml
index ce18e02..af42db3 100644
--- a/kubernetes/sdnc/all-services.yaml
+++ b/kubernetes/sdnc/templates/all-services.yaml
@@ -2,6 +2,7 @@
kind: Service
metadata:
name: dbhost
+ namespace: {{ .Values.NS }}
labels:
app: sdnc-dbhost
spec:
@@ -15,6 +16,7 @@
kind: Service
metadata:
name: sdnctldb01
+ namespace: {{ .Values.NS }}
labels:
app: sdnc-dbhost
spec:
@@ -28,6 +30,7 @@
kind: Service
metadata:
name: sdnctldb02
+ namespace: {{ .Values.NS }}
labels:
app: sdnc-dbhost
spec:
@@ -41,6 +44,7 @@
kind: Service
metadata:
name: sdnc-dgbuilder
+ namespace: {{ .Values.NS }}
labels:
app: sdnc-dgbuilder
spec:
@@ -57,6 +61,7 @@
kind: Service
metadata:
name: sdnhost
+ namespace: {{ .Values.NS }}
labels:
app: sdnc
spec:
@@ -73,6 +78,7 @@
kind: Service
metadata:
name: sdnc-portal
+ namespace: {{ .Values.NS }}
labels:
app: sdnc-portal
spec:
diff --git a/kubernetes/sdnc/db-deployment.yaml b/kubernetes/sdnc/templates/db-deployment.yaml
similarity index 86%
rename from kubernetes/sdnc/db-deployment.yaml
rename to kubernetes/sdnc/templates/db-deployment.yaml
index 685edec..1a2ecba 100644
--- a/kubernetes/sdnc/db-deployment.yaml
+++ b/kubernetes/sdnc/templates/db-deployment.yaml
@@ -2,6 +2,7 @@
kind: Deployment
metadata:
name: sdnc-dbhost
+ namespace: {{ .Values.NS }}
spec:
selector:
matchLabels:
@@ -18,7 +19,8 @@
value: openECOMP1.0
- name: MYSQL_ROOT_HOST
value: '%'
- image: mysql/mysql-server:5.6
+ image: {{ .Values.image.mysqlServer }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: sdnc-db-container
volumeMounts:
- mountPath: /var/lib/mysql
diff --git a/kubernetes/sdnc/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
similarity index 83%
rename from kubernetes/sdnc/dgbuilder-deployment.yaml
rename to kubernetes/sdnc/templates/dgbuilder-deployment.yaml
index 13781ff..3670433 100644
--- a/kubernetes/sdnc/dgbuilder-deployment.yaml
+++ b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
@@ -2,6 +2,7 @@
kind: Deployment
metadata:
name: sdnc-dgbuilder
+ 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": "sdnc-dgbuilder-readiness"
}
]'
@@ -44,13 +45,14 @@
- command:
- /bin/bash
- -c
- - cd /opt/openecomp/sdnc/dgbuilder/ && ./start sdnc1.0 && wait
+ - cd /opt/openecomp/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
env:
- name: MYSQL_ROOT_PASSWORD
value: openECOMP1.0
- name: SDNC_CONFIG_DIR
value: /opt/openecomp/sdnc/data/properties
- image: nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.0-STAGING-latest
+ image: {{ .Values.image.dgbuilderSdnc }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: sdnc-dgbuilder-container
ports:
- containerPort: 3100
diff --git a/kubernetes/sdnc/sdnc-deployment.yaml b/kubernetes/sdnc/templates/sdnc-deployment.yaml
similarity index 87%
rename from kubernetes/sdnc/sdnc-deployment.yaml
rename to kubernetes/sdnc/templates/sdnc-deployment.yaml
index 0dc4839..eb1fdc8 100644
--- a/kubernetes/sdnc/sdnc-deployment.yaml
+++ b/kubernetes/sdnc/templates/sdnc-deployment.yaml
@@ -2,6 +2,7 @@
kind: Deployment
metadata:
name: sdnc
+ namespace: {{ .Values.NS }}
spec:
selector:
matchLabels:
@@ -32,8 +33,8 @@
}
}
],
- "image": "oomk8s/readiness-check:1.0.0",
- "imagePullPolicy": "Always",
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
"name": "sdnc-readiness"
}
]'
@@ -46,7 +47,8 @@
value: openECOMP1.0
- name: SDNC_CONFIG_DIR
value: /opt/openecomp/sdnc/data/properties
- image: nexus3.onap.org:10001/openecomp/sdnc-image:1.0-STAGING-latest
+ image: {{ .Values.image.sdnc }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: sdnc-controller-container
volumeMounts:
- mountPath: /opt/openecomp/sdnc/data/properties
diff --git a/kubernetes/sdnc/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml
similarity index 86%
rename from kubernetes/sdnc/web-deployment.yaml
rename to kubernetes/sdnc/templates/web-deployment.yaml
index 36df93b..280bf25 100644
--- a/kubernetes/sdnc/web-deployment.yaml
+++ b/kubernetes/sdnc/templates/web-deployment.yaml
@@ -2,6 +2,7 @@
kind: Deployment
metadata:
name: sdnc-portal
+ 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": "sdnc-portal-readiness"
}
]'
@@ -50,7 +51,8 @@
value: openECOMP1.0
- name: SDNC_CONFIG_DIR
value: /opt/openecomp/sdnc/data/properties
- image: nexus3.onap.org:10001/openecomp/admportal-sdnc-image:1.0-STAGING-latest
+ image: {{ .Values.image.admportalSdnc }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
name: sdnc-portal-container
ports:
- containerPort: 8843
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
new file mode 100644
index 0000000..b9b3c04
--- /dev/null
+++ b/kubernetes/sdnc/values.yaml
@@ -0,0 +1,8 @@
+NS: onap-sdnc
+pullPolicy: Always
+image:
+ readiness: oomk8s/readiness-check:1.0.0
+ mysqlServer: mysql/mysql-server:5.6
+ dgbuilderSdnc: nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest
+ sdnc: nexus3.onap.org:10001/openecomp/sdnc-image:1.1-STAGING-latest
+ admportalSdnc: nexus3.onap.org:10001/openecomp/admportal-sdnc-image:1.1-STAGING-latest