diff --git a/devops/azure/chart/templates/deployment.yaml b/devops/azure/chart/templates/deployment.yaml index 64ccd620519cf859b45942926a44c4ab4a093ade..1009599478d58e8db7a930869870043023e66890 100644 --- a/devops/azure/chart/templates/deployment.yaml +++ b/devops/azure/chart/templates/deployment.yaml @@ -49,7 +49,11 @@ spec: readinessProbe: httpGet: path: /api/partition/v1/actuator/health - port: 80 + port: 8081 + livenessProbe: + httpGet: + path: /api/partition/v1/actuator/health + port: 8081 volumeMounts: - name: azure-keyvault mountPath: "/mnt/azure-keyvault" 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 deleted file mode 100644 index edbd03beafb50ee63e02e95b2d84a33a6bb2b1d6..0000000000000000000000000000000000000000 --- a/provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.opengroup.osdu.partition.provider.azure.service; - -import lombok.RequiredArgsConstructor; -import org.opengroup.osdu.partition.model.PartitionInfo; -import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.actuate.health.Health; -import org.springframework.boot.actuate.health.HealthIndicator; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Service; - -@Service -@Primary -@RequiredArgsConstructor -class CacheServiceHealthIndicatorImpl implements HealthIndicator { - - @Autowired - @Qualifier("partitionServiceCache") - private IPartitionServiceCache<String, PartitionInfo> partitionServiceCache; - - @Value("${redis.custom.readiness.check.enabled}") - private boolean redisCustomReadinessCheck; - - @Override - public Health health() { - if (redisCustomReadinessCheck) { - try { - partitionServiceCache.get("dummy-key"); - } catch (Exception ex) { - return Health.down().withDetail("Cache service", ex).build(); - } - } - return Health.up().build(); - } -} diff --git a/provider/partition-azure/src/main/resources/application.properties b/provider/partition-azure/src/main/resources/application.properties index df0d9d3497a15de7b7fa50758b8e3f797774aba2..7da879f59be16d728b121d0226f59f795cc03381 100644 --- a/provider/partition-azure/src/main/resources/application.properties +++ b/provider/partition-azure/src/main/resources/application.properties @@ -38,7 +38,7 @@ redis.database=${REDIS_DATABASE} # health check management.health.azure-key-vault.enabled=false -redis.custom.readiness.check.enabled=false +management.server.port=8081 azure.cryptography.enabled=false azure.eventgrid.topic.enabled=false