Add DCM to K8s deployment file 93/113393/2
authorIgor D.C <igor.duarte.cardoso@intel.com>
Wed, 30 Sep 2020 17:09:28 +0000 (17:09 +0000)
committerIgor D.C <igor.duarte.cardoso@intel.com>
Wed, 30 Sep 2020 17:12:26 +0000 (17:12 +0000)
Issue-ID: MULTICLOUD-1143
Change-Id: Iaca9bd6cb3614e0ae825d9231476524ce09db550
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
deployments/kubernetes/onap4k8s.yaml
src/dcm/config.json

index 6e40487..1d0c55f 100644 (file)
@@ -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
+
index 65a18ac..7e1f579 100644 (file)
@@ -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"
 }