Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Partition
Commits
ca828b0a
Commit
ca828b0a
authored
May 21, 2021
by
Mingyang Zhu
Browse files
change health port to 8081, remove azure customized health implementation
parent
fcdae6e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
devops/azure/chart/templates/deployment.yaml
View file @
ca828b0a
...
...
@@ -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"
...
...
provider/partition-azure/src/main/java/org/opengroup/osdu/partition/provider/azure/service/HealthCheckServiceImpl.java
deleted
100644 → 0
View file @
fcdae6e9
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
();
}
}
provider/partition-azure/src/main/resources/application.properties
View file @
ca828b0a
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment