summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2020-09-30 17:45:29 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-30 17:45:29 +0000
commitb5ab5c74b248d0a9b037ad1ed8f8f733e11c5c32 (patch)
tree0aab1d204e169e931fcedf5e35ff85a8e5ad81f7
parentc054ad56bc30e85fa83560db89fa72b3534b1639 (diff)
parentb87c7382463537bf44acc4d0a59eda4f1635dba0 (diff)
Merge "Add DCM to K8s deployment file"
-rw-r--r--deployments/kubernetes/onap4k8s.yaml72
-rw-r--r--src/dcm/config.json12
2 files changed, 74 insertions, 10 deletions
diff --git a/deployments/kubernetes/onap4k8s.yaml b/deployments/kubernetes/onap4k8s.yaml
index 6e404873..1d0c55f7 100644
--- a/deployments/kubernetes/onap4k8s.yaml
+++ b/deployments/kubernetes/onap4k8s.yaml
@@ -361,3 +361,75 @@ spec:
- key: config.json
path: config.json
+---
+# DCM Config Map
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: dcm
+ labels:
+ app: dcm
+data:
+ config.json: |
+ {
+ "database-type": "mongo",
+ "database-ip": "mongo",
+ "etcd-ip": "etcd",
+ "service-port": "9077"
+ }
+
+---
+# DCM Service
+apiVersion: v1
+kind: Service
+metadata:
+ name: dcm
+ labels:
+ app: dcm
+spec:
+ selector:
+ app: dcm
+ type: NodePort
+ ports:
+ - name: http
+ port: 9077
+ nodePort: 31877
+ protocol: TCP
+ targetPort: 9077
+
+---
+# DCM Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: dcm
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: dcm
+ template:
+ metadata:
+ labels:
+ app: dcm
+ spec:
+ containers:
+ - name: dcm
+ image: emcov2/emco:stable
+ imagePullPolicy: Always
+ command: ["/opt/emco/entrypoint", "dcm"]
+ workingDir: /opt/emco
+ ports:
+ - containerPort: 9077
+ volumeMounts:
+ - name: config
+ mountPath: /opt/emco/config.json
+ subPath: config.json
+ volumes:
+ - name: config
+ configMap:
+ name: dcm
+ items:
+ - key: config.json
+ path: config.json
+
diff --git a/src/dcm/config.json b/src/dcm/config.json
index 65a18acb..7e1f579c 100644
--- a/src/dcm/config.json
+++ b/src/dcm/config.json
@@ -1,14 +1,6 @@
{
- "database-ip": "172.18.0.2",
"database-type": "mongo",
- "plugin-dir": "plugins",
- "service-port": "9077",
- "ca-file": "ca.cert",
- "server-cert": "server.cert",
- "server-key": "server.key",
- "password": "",
+ "database-ip": "172.18.0.2",
"etcd-ip": "172.18.0.3",
- "etcd-cert": "",
- "etcd-key": "",
- "etcd-ca-file": ""
+ "service-port": "9077"
}