summaryrefslogtreecommitdiffstats
path: root/kubernetes/vid/templates
diff options
context:
space:
mode:
authorkerenj <keren.joseph@amdocs.com>2017-08-23 07:39:14 +0000
committerkerenj <keren.joseph@amdocs.com>2017-08-24 09:57:43 +0000
commitbf4b4a00464a1adfea03155ee3b9491ac0fe9f4d (patch)
treec2ef628a17b150f318abdbd5bc212bb056b31ec6 /kubernetes/vid/templates
parent8f62ce693e2fd25a50588b0fc68f3d5946a4942c (diff)
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>
Diffstat (limited to 'kubernetes/vid/templates')
-rw-r--r--kubernetes/vid/templates/all-services.yaml28
-rw-r--r--kubernetes/vid/templates/vid-mariadb-deployment.yaml56
-rw-r--r--kubernetes/vid/templates/vid-server-deployment.yaml97
3 files changed, 181 insertions, 0 deletions
diff --git a/kubernetes/vid/templates/all-services.yaml b/kubernetes/vid/templates/all-services.yaml
new file mode 100644
index 0000000000..1018dedb2b
--- /dev/null
+++ b/kubernetes/vid/templates/all-services.yaml
@@ -0,0 +1,28 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: vid-mariadb
+ namespace: {{ .Values.NS }}
+spec:
+ ports:
+ - name: vid-mariadb
+ port: 3306
+ selector:
+ app: vid-mariadb
+ clusterIP: None
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: vid-server
+ name: vid-server
+ namespace: {{ .Values.NS }}
+spec:
+ ports:
+ - name: vid-server
+ nodePort: 30200
+ port: 8080
+ selector:
+ app: vid-server
+ type: NodePort
diff --git a/kubernetes/vid/templates/vid-mariadb-deployment.yaml b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
new file mode 100644
index 0000000000..cf3b8a22e0
--- /dev/null
+++ b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
@@ -0,0 +1,56 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ labels:
+ app: vid-mariadb
+ name: vid-mariadb
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: vid-mariadb
+ template:
+ metadata:
+ labels:
+ app: vid-mariadb
+ name: vid-mariadb
+ spec:
+ containers:
+ - image: {{ .Values.image.mariadb }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: vid-mariadb
+ env:
+ - name: MYSQL_DATABASE
+ value: vid_openecomp_epsdk
+ - name: MYSQL_USER
+ value: vidadmin
+ - name: MYSQL_PASSWORD
+ value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - name: MYSQL_ROOT_PASSWORD
+ value: LF+tp_1WqgSY
+ volumeMounts:
+ - mountPath: /var/lib/mysql
+ name: vid-mariadb-data
+ - mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql
+ name: vid-pre-init
+ - mountPath: /etc/mysql/my.cnf
+ name: my-cnf
+ ports:
+ - containerPort: 3306
+ readinessProbe:
+ tcpSocket:
+ port: 3306
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ volumes:
+ - name: vid-mariadb-data
+ hostPath:
+ path: /dockerdata-nfs/onap/vid/mariadb/data
+ - name: vid-pre-init
+ hostPath:
+ path: /dockerdata-nfs/onap/vid/vid/lf_config/vid-pre-init.sql
+ - name: my-cnf
+ hostPath:
+ path: /dockerdata-nfs/onap/vid/vid/lf_config/vid-my.cnf
+ imagePullSecrets:
+ - name: onap-docker-registry-key
diff --git a/kubernetes/vid/templates/vid-server-deployment.yaml b/kubernetes/vid/templates/vid-server-deployment.yaml
new file mode 100644
index 0000000000..58ce80b80b
--- /dev/null
+++ b/kubernetes/vid/templates/vid-server-deployment.yaml
@@ -0,0 +1,97 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ labels:
+ app: vid-server
+ name: vid-server
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: vid-server
+ template:
+ metadata:
+ labels:
+ app: vid-server
+ name: vid-server
+ annotations:
+ pod.beta.kubernetes.io/init-containers: '[
+ {
+ "args": [
+ "--container-name",
+ "vid-mariadb"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "apiVersion": "v1",
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vid-server-readiness"
+ }
+ ]'
+ spec:
+ containers:
+ - env:
+ - name: ASDC_CLIENT_REST_HOST
+ value: sdc-be.onap-sdc
+ - name: ASDC_CLIENT_REST_AUTH
+ value: Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
+ - name: ASDC_CLIENT_REST_PORT
+ value: "8080"
+ - name: VID_AAI_HOST
+ value: aai-service.onap-aai
+ - name: VID_AAI_PORT
+ value: "8443"
+ - name: VID_ECOMP_SHARED_CONTEXT_REST_URL
+ value: http://portalapps.onap-portal:8989/ECOMPPORTAL/context
+ - name: VID_MSO_SERVER_URL
+ value: http://mso.onap-mso:8080
+ - name: VID_MSO_PASS
+ value: 51515201a8d4c5c08d533db9bd1e1a9b
+ - name: MSO_DME2_SERVER_URL
+ value: http://localhost:8081
+ - name: MSO_DME2_ENABLED
+ value: "false"
+ - name: VID_ECOMP_REDIRECT_URL
+ value: http://portalapps.onap-portal:8989/ECOMPPORTAL/login.htm
+ - name: VID_ECOMP_REST_URL
+ value: http://portalapps.onap-portal:8989/ECOMPPORTAL/auxapi
+ - name: VID_CONTACT_US_LINK
+ value: https://todo_contact_us_link.com
+ - name: VID_UEB_URL_LIST
+ value: dmaap.onap-message-router
+ - name: VID_MYSQL_HOST
+ value: vid-mariadb
+ - name: VID_MYSQL_PORT
+ value: "3306"
+ - name: VID_MYSQL_DBNAME
+ value: vid_openecomp_epsdk
+ - name: VID_MYSQL_USER
+ value: vidadmin
+ - name: VID_MYSQL_PASS
+ value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - name: VID_MYSQL_MAXCONNECTIONS
+ value: "5"
+ image: {{ .Values.image.vid }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: vid-server
+ ports:
+ - containerPort: 8080
+ readinessProbe:
+ tcpSocket:
+ port: 8080
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ imagePullSecrets:
+ - name: onap-docker-registry-key