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 ad085ee5adf0e526c30266c43fa939dcf71bfde4
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu May 13 08:13:03 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the 
components - EKS Component
---
 .../main/java/org/apache/camel/component/aws2/eks/EKS2Component.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Component.java
 
b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Component.java
index c3a47d5..98ad71f 100644
--- 
a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Component.java
+++ 
b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Component.java
@@ -52,9 +52,9 @@ public class EKS2Component extends DefaultComponent {
         EKS2Configuration configuration = this.configuration != null ? 
this.configuration.copy() : new EKS2Configuration();
         EKS2Endpoint endpoint = new EKS2Endpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        if (configuration.getEksClient() == null
+        if (!configuration.isUseDefaultCredentialsProvider() && 
configuration.getEksClient() == null
                 && (configuration.getAccessKey() == null || 
configuration.getSecretKey() == null)) {
-            throw new IllegalArgumentException("Amazon eks client or accessKey 
and secretKey must be specified");
+            throw new IllegalArgumentException("useDefaultCredentialsProvider 
is set to false, Amazon eks client or accessKey and secretKey must be 
specified");
         }
 
         return endpoint;

Reply via email to