From 8bcca6a1f5dbe5e37c1be80e31af96d63cf9dbde Mon Sep 17 00:00:00 2001
From: Mingyang Zhu <mzhu9@slb.com>
Date: Thu, 13 May 2021 12:48:28 -0500
Subject: [PATCH] fix the bean annotation

---
 devops/azure/chart/templates/deployment.yaml                  | 4 ----
 devops/azure/release.yaml                                     | 4 ----
 .../osdu/partition/service/DefaultHealthCheckImpl.java        | 2 --
 .../provider/azure/service/HealthCheckServiceImpl.java        | 2 ++
 4 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml
index fca492b63..22c1d8a3a 100644
--- a/devops/azure/chart/templates/deployment.yaml
+++ b/devops/azure/chart/templates/deployment.yaml
@@ -50,10 +50,6 @@ spec:
           httpGet:
             path: /api/partition/v1/_ah/readiness_check
             port: 80
-        livenessProbe:
-          httpGet:
-            path: /api/partition/v1/_ah/liveness_check
-            port: 80
         volumeMounts:
         - name: azure-keyvault
           mountPath: "/mnt/azure-keyvault"
diff --git a/devops/azure/release.yaml b/devops/azure/release.yaml
index 1d1d4afdd..e72c308b5 100644
--- a/devops/azure/release.yaml
+++ b/devops/azure/release.yaml
@@ -76,10 +76,6 @@ spec:
           httpGet:
             path: /api/partition/v1/_ah/readiness_check
             port: 80
-        livenessProbe:
-          httpGet:
-            path: /api/partition/v1/_ah/liveness_check
-            port: 80
         volumeMounts:
         - name: azure-keyvault
           mountPath: "/mnt/azure-keyvault"
diff --git a/partition-core/src/main/java/org/opengroup/osdu/partition/service/DefaultHealthCheckImpl.java b/partition-core/src/main/java/org/opengroup/osdu/partition/service/DefaultHealthCheckImpl.java
index 23fb95a8d..102bffb95 100644
--- a/partition-core/src/main/java/org/opengroup/osdu/partition/service/DefaultHealthCheckImpl.java
+++ b/partition-core/src/main/java/org/opengroup/osdu/partition/service/DefaultHealthCheckImpl.java
@@ -1,11 +1,9 @@
 package org.opengroup.osdu.partition.service;
 
 import org.opengroup.osdu.partition.provider.interfaces.IHealthCheckService;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.stereotype.Service;
 
 @Service
-@ConditionalOnMissingBean(value = IHealthCheckService.class)
 public class DefaultHealthCheckImpl implements IHealthCheckService {
 
     @Override
diff --git a/provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java b/provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java
index 1917f77ac..d72eebe70 100644
--- a/provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java
+++ b/provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java
@@ -7,9 +7,11 @@ import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache;
 import org.opengroup.osdu.partition.service.DefaultHealthCheckImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
 @RequiredArgsConstructor
 public class HealthCheckServiceImpl extends DefaultHealthCheckImpl {
 
-- 
GitLab