You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/10/27 10:16:04 UTC
[camel] 01/03: CAMEL-18131 - camel-health - Add health checks for components that has extension for connectivity verification - Fix check for region before looking for enabled services - EKS
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0e297cc1a88271b58f44df59521a0e5969875f32
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Oct 27 11:59:51 2022 +0200
CAMEL-18131 - camel-health - Add health checks for components that has extension for connectivity verification - Fix check for region before looking for enabled services - EKS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../apache/camel/component/aws2/eks/EKS2ClientHealthCheck.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2ClientHealthCheck.java b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2ClientHealthCheck.java
index 8ce3e4db1db..4a74b29abed 100644
--- a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2ClientHealthCheck.java
+++ b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2ClientHealthCheck.java
@@ -49,10 +49,12 @@ public class EKS2ClientHealthCheck extends AbstractHealthCheck {
@Override
protected void doCall(HealthCheckResultBuilder builder, Map<String, Object> options) {
EKS2Configuration configuration = eks2Endpoint.getConfiguration();
- if (!EksClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
- builder.message("The service is not supported in this region");
- builder.down();
- return;
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ if (!EksClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
+ builder.message("The service is not supported in this region");
+ builder.down();
+ return;
+ }
}
try {
EKS2InternalClient eks2Client = EKS2ClientFactory.getEksClient(configuration);