Commit 302e29b0 authored by Mingyang Zhu's avatar Mingyang Zhu
Browse files

mark DefaultHealthCheckImpl ConditionalOnMissingBean

parent 37f99534
......@@ -74,7 +74,11 @@ spec:
- containerPort: 80
readinessProbe:
httpGet:
path: /api/partition/v1/swagger-ui.html
path: /api/partition/v1/_ah/readiness_check
port: 80
livenessProbe:
httpGet:
path: /api/partition/v1/_ah/liveness_check
port: 80
volumeMounts:
- name: azure-keyvault
......
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
public class DefaultHealthCheckImpl implements IHealthCheckService {
@Override
......
......@@ -4,23 +4,19 @@ import lombok.RequiredArgsConstructor;
import org.opengroup.osdu.partition.model.PartitionInfo;
import org.opengroup.osdu.partition.provider.interfaces.IHealthCheckService;
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.stereotype.Service;
@Service
@RequiredArgsConstructor
public class HealthCheckServiceImpl implements IHealthCheckService {
public class HealthCheckServiceImpl extends DefaultHealthCheckImpl {
@Autowired
@Qualifier("partitionServiceCache")
private IPartitionServiceCache<String, PartitionInfo> partitionServiceCache;
@Override
public void performLivenessCheck() {
}
/**
* Cache layer must be ready before the pod can serve the traffic
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment