Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQS IntegrationSink queueNameOrArn missing #8511

Open
tpg-swarner opened this issue Feb 26, 2025 · 2 comments
Open

SQS IntegrationSink queueNameOrArn missing #8511

tpg-swarner opened this issue Feb 26, 2025 · 2 comments
Labels
area/integrations area/sinks kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)

Comments

@tpg-swarner
Copy link

tpg-swarner commented Feb 26, 2025

Describe the bug
The SQS IntegrationSink can not be successfully created. Once running, I am presented this error within the associated pod:
... Caused by: java.lang.IllegalArgumentException: Route template aws-sqs-sink the following mandatory parameters must be provided: queueNameOrArn at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:478) at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:416) at org.apache.camel.impl.DefaultCamelContext.addRouteFromTemplate(DefaultCamelContext.java:362) at org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.createRouteForEndpoint(KameletComponent.java:457) ... 28 more

Expected behavior
The IntegrationSink is created and runs correctly with no errors.

To Reproduce

kind: IntegrationSink
metadata:
  name: sqsIntegrationSinkTest
  namespace: test
spec:
  aws:
    auth:
      secret:
        ref:
          name: sqsIntegrationSinkTest
    sqs:
      arn: "arn:aws:sqs:us-east-2:************:sqsIntegrationSinkTest
      region: us-east-2

Knative release version
1.17.0

Additional context
This is the first time attempting to use this custom resource type. I noticed on the describe call against the associated pod this set of registered environment variables:

      CAMEL_KAMELET_AWS_SQS_SINK_REGION:              us-east-2
      CAMEL_KAMELET_AWS_SQS_SINK_OVERRIDEENDPOINT:    false
      CAMEL_KAMELET_AWS_SQS_SOURCE_QUEUENAMEORARN:    arn:aws:sqs:us-east-2:************:sqsIntegrationSinkTest
      CAMEL_KAMELET_AWS_SQS_SINK_DELETEAFTERREAD:     true
      CAMEL_KAMELET_AWS_SQS_SINK_AUTOCREATEQUEUE:     false
      CAMEL_KAMELET_AWS_SQS_SOURCE_AMAZONAWSHOST:     amazonaws.com
      CAMEL_KAMELET_AWS_SQS_SINK_PROTOCOL:            https
      CAMEL_KAMELET_AWS_SQS_SINK_GREEDY:              false
      CAMEL_KAMELET_AWS_SQS_SINK_DELAY:               500
      CAMEL_KAMELET_AWS_SQS_SINK_MAXMESSAGESPERPOLL:  1
      CAMEL_KAMELET_AWS_SQS_SINK_WAITTIMESECONDS:     0
      CAMEL_KAMELET_AWS_SQS_SINK_VISIBILITYTIMEOUT:   0
      CAMEL_KAMELET_AWS_SQS_SINK_ACCESSKEY:           <set to the key 'aws.accessKey' in secret '*******'>  Optional: false
      CAMEL_KAMELET_AWS_SQS_SINK_SECRETKEY:           <set to the key 'aws.secretKey' in secret '*******'>  Optional: false

I believe that the environment variable CAMEL_KAMELET_AWS_SQS_SOURCE_QUEUENAMEORARN"should be CAMEL_KAMELET_AWS_SQS_SINK_QUEUENAMEORARN in order for this code

		envVars = append(envVars, integration.GenerateEnvVarsFromStruct("CAMEL_KAMELET_LOG_SINK", *sink.Spec.Log)...)
		return envVars
	}

here to properly read the environment variables.

@tpg-swarner tpg-swarner added the kind/bug Categorizes issue or PR as related to a bug. label Feb 26, 2025
@pierDipi
Copy link
Member

@tpg-swarner Thanks for reporting! would you be interesting in contributing a fix?

@pierDipi pierDipi added the triage/accepted Issues which should be fixed (post-triage) label Feb 27, 2025
@tpg-swarner
Copy link
Author

@pierDipi Sure. I'll take a stab at it. It'll take me a little bit to get set up for contributing, but I should be able to take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/integrations area/sinks kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

2 participants