dmi-stub-2 restart issue and "Connection refused exception" 67/142867/2
authoregernug <gerard.nugent@est.tech>
Wed, 7 Jan 2026 15:49:50 +0000 (15:49 +0000)
committerGerard Nugent <gerard.nugent@est.tech>
Wed, 7 Jan 2026 16:45:00 +0000 (16:45 +0000)
- Fixed Template Structure
- Standardized Port Configuration (unified container ports 8092)
- Added actuator environment variables
- Configured working probes
- The setup now provides two independent DMI stub services with reliable health monitoring and external access.

Issue-ID: CPS-3056

Change-Id: I7e4b7db4c0e29ab887597ef5f8ba16778f4d74d2
Signed-off-by: egernug <gerard.nugent@est.tech>
cps-charts/templates/dmi-stub-deployment-1.yaml
cps-charts/templates/dmi-stub-deployment-2.yaml
cps-charts/templates/dmi-stub-service-1.yaml
cps-charts/templates/dmi-stub-service-2.yaml
cps-charts/values.yaml

index e4593c2..4852329 100644 (file)
@@ -11,11 +11,13 @@ spec:
     matchLabels:
       app: {{ include "cps-and-ncmp.name" . }}
       component: dmi-stub
+      instance: dmi-stub-1
   template:
     metadata:
       labels:
         app: {{ include "cps-and-ncmp.name" . }}
         component: dmi-stub
+        instance: dmi-stub-1
     spec:
       containers:
         - name: dmi-stub
@@ -24,6 +26,12 @@ spec:
           ports:
             - containerPort: {{ .Values.dmiStub.deployment1.containerPort }}
           env:
+            - name: DMI_STUB_SERVER_PORT
+              value: "{{ .Values.dmiStub.deployment1.containerPort }}"
+            - name: MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE
+              value: "health,info"
+            - name: MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS
+              value: "always"
             {{- range $key, $value := .Values.dmiStub.env }}
             - name: {{ $key }}
               value: "{{ $value }}"
@@ -32,3 +40,5 @@ spec:
             {{- toYaml .Values.dmiStub.resources | nindent 12 }}
           livenessProbe:
             {{- toYaml .Values.dmiStub.livenessProbe.deployment1 | nindent 12 }}
+          readinessProbe:
+            {{- toYaml .Values.dmiStub.readinessProbe.deployment1 | nindent 12 }}
\ No newline at end of file
index 4ad307b..04435d1 100644 (file)
@@ -11,11 +11,13 @@ spec:
     matchLabels:
       app: {{ include "cps-and-ncmp.name" . }}
       component: dmi-stub
+      instance: dmi-stub-2
   template:
     metadata:
       labels:
         app: {{ include "cps-and-ncmp.name" . }}
         component: dmi-stub
+        instance: dmi-stub-2
     spec:
       containers:
         - name: dmi-stub
@@ -26,6 +28,10 @@ spec:
           env:
             - name: DMI_STUB_SERVER_PORT
               value: "{{ .Values.dmiStub.deployment2.containerPort }}"
+            - name: MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE
+              value: "health,info"
+            - name: MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS
+              value: "always"
             {{- range $key, $value := .Values.dmiStub.env }}
             - name: {{ $key }}
               value: "{{ $value }}"
@@ -34,3 +40,5 @@ spec:
             {{- toYaml .Values.dmiStub.resources | nindent 12 }}
           livenessProbe:
             {{- toYaml .Values.dmiStub.livenessProbe.deployment2 | nindent 12 }}
+          readinessProbe:
+            {{- toYaml .Values.dmiStub.readinessProbe.deployment2 | nindent 12 }}
index f498a95..1feca0e 100644 (file)
@@ -18,3 +18,4 @@ spec:
   selector:
     app: {{ include "cps-and-ncmp.name" . }}
     component: dmi-stub
+    instance: dmi-stub-1
index 5cf8667..cc128cd 100644 (file)
@@ -18,3 +18,4 @@ spec:
   selector:
     app: {{ include "cps-and-ncmp.name" . }}
     component: dmi-stub
+    instance: dmi-stub-2
index 4c05574..7050773 100644 (file)
@@ -130,14 +130,14 @@ dmiStub:
   deployment1:
     containerPort: 8092
   deployment2:
-    containerPort: 8093
+    containerPort: 8092
   service1:
     type: NodePort
     port: 8092
     nodePort: 30092
   service2:
     type: NodePort
-    port: 8093
+    port: 8092
     nodePort: 31092
   env:
     KAFKA_BOOTSTRAP_SERVER: "cps-ncmp-kafka.default.svc.cluster.local:9092"
@@ -158,15 +158,34 @@ dmiStub:
   livenessProbe:
     deployment1:
       httpGet:
-        path: /actuator/health/readiness
+        path: /actuator/health
+        port: 8092
+      initialDelaySeconds: 60
+      periodSeconds: 30
+      failureThreshold: 5
+      timeoutSeconds: 10
+    deployment2:
+      httpGet:
+        path: /actuator/health
+        port: 8092
+      initialDelaySeconds: 60
+      periodSeconds: 30
+      failureThreshold: 5
+      timeoutSeconds: 10
+  readinessProbe:
+    deployment1:
+      httpGet:
+        path: /actuator/health
         port: 8092
       initialDelaySeconds: 30
       periodSeconds: 10
       failureThreshold: 3
+      timeoutSeconds: 5
     deployment2:
       httpGet:
-        path: /actuator/health/readiness
-        port: 8093
+        path: /actuator/health
+        port: 8092
       initialDelaySeconds: 30
       periodSeconds: 10
       failureThreshold: 3
+      timeoutSeconds: 5