Andrea Cosentino created CAMEL-28032:
----------------------------------------

             Summary: camel-aws2-eks: createCluster treats its three mandatory 
inputs as optional, and operation is wrongly required
                 Key: CAMEL-28032
                 URL: https://issues.apache.org/jira/browse/CAMEL-28032
             Project: Camel
          Issue Type: Bug
          Components: camel-aws2
            Reporter: Andrea Cosentino


Found during an audit of the cloud components (camel-aws, camel-azure, 
camel-google, camel-huawei) at commit 7c0644752e17. Every item below was 
verified against the source.

h4. 1. createCluster reads its mandatory inputs with getOptionalHeader
{{EKS2Producer.createCluster}} reads {{CLUSTER_NAME}}, {{ROLE_ARN}} and the VPC 
config with {{getOptionalHeader}} and only sets them when present, although the 
EKS CreateCluster API requires all three. {{describeCluster}} and 
{{deleteCluster}} in the same class use {{getRequiredHeader(exchange, ..., 
"Cluster name must be specified")}}. A missing header therefore costs an AWS 
round trip and returns an opaque ValidationException instead of a local, named 
error.
Proposed change: use getRequiredHeader for the three inputs.

h4. 2. operation is required although the header replaces it
{{EKS2Configuration}} carries {{@Metadata(required = true)}} while the 
description says "The CamelAwsEKSOperation header replaces this option" and 
{{EKS2Producer.determineOperation}} raises a clear error when neither is set. 
Same defect CAMEL-27623 fixed for aws2-ecs.

h4. 3. Only cluster CRUD
{{EKS2Operations}} is listClusters, describeCluster, createCluster, 
deleteCluster. {{listNodegroups}}, {{describeNodegroup}}, {{createNodegroup}}, 
{{listFargateProfiles}}, {{updateClusterConfig}} and {{listUpdates}} are 
absent, so the component cannot manage the compute of a cluster it just created.

_Claude Code on behalf of oscerd_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to