argo-events: Problem with setting SQS queue

Describe the bug We are creating EventSource on EKS k8s cluster that should consume from SQS

To Reproduce Steps to reproduce the behavior:

kind: EventSource
metadata:
  name: aws-sqs
spec:
  sqs:
    sqs-git:
      jsonBody: true
      accessKey:
        key: accesskey
        name: aws-secret
      secretKey:
        key: secretkey
        name: aws-secret
      region: eu-west-1
      queue: test

we also have aws secrets as in the example:

apiVersion: v1
kind: Secret
metadata:
  name: aws-secret
type: Opaque
data:
   accesskey: XXXXX
   secretkey: XXXXX

we can see in logs that it is trying to generate aws sqs url, but because of some reason it is failling:

(...)
2021-02-17T16:04:45.743Z	INFO	argo-events.eventsource	awssqs/start.go:76	fetching queue url...	{"eventSourceName": "aws-sqs", "eventSourceType": "sqs", "eventName": "sqs-git"}
2021-02-17T16:04:46.064Z	ERROR	argo-events.eventsource	eventsources/eventing.go:355	failed to start listening eventsource	{"eventSourceName": "aws-sqs", "eventSourceType": "sqs", "eventName": "sqs-git", "error": "timed out waiting for the condition"}
github.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).Start.func3
	/home/runner/work/argo-events/argo-events/eventsources/eventing.go:355
2021-02-17T16:04:46.064Z	ERROR	argo-events.eventsource	eventsources/eventing.go:378	Erroring out, no active event server running	{"eventSourceName": "aws-sqs"}
github.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).Start
	/home/runner/work/argo-events/argo-events/eventsources/eventing.go:378
main.main
	/home/runner/work/argo-events/argo-events/eventsources/cmd/main.go:58
runtime.main
	/opt/hostedtoolcache/go/1.14.13/x64/src/runtime/proc.go:203
2021-02-17T16:04:46.064Z	INFO	argo-events.eventsource	eventsources/eventing.go:291	exiting eventbus connection daemon...	{"eventSourceName": "aws-sqs"}
2021-02-17T16:04:46.066Z	ERROR	argo-events.eventsource	driver/nats.go:84	NATS connection lost	{"eventSourceName": "aws-sqs", "clientID": "aws-sqs-eventsource-pvg7l-6d5f58f56b-bssz5"}
github.com/argoproj/argo-events/eventbus/driver.(*natsStreaming).Connect.func1
	/home/runner/work/argo-events/argo-events/eventbus/driver/nats.go:84
github.com/nats-io/nats%2ego.(*Conn).close.func1
	/home/runner/go/pkg/mod/github.com/nats-io/nats.go@v1.9.1/nats.go:3722
github.com/nats-io/nats%2ego.(*asyncCallbacksHandler).asyncCBDispatcher
	/home/runner/go/pkg/mod/github.com/nats-io/nats.go@v1.9.1/nats.go:2008
2021-02-17T16:04:46.066Z	FATAL	argo-events.eventsource	cmd/main.go:59	failed to start eventsource server	{"eventSourceName": "aws-sqs", "error": "no active event server running", "errorVerbose": "no active event server running\ngithub.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).Start\n\t/home/runner/work/argo-events/argo-events/eventsources/eventing.go:381\nmain.main\n\t/home/runner/work/argo-events/argo-events/eventsources/cmd/main.go:58\nruntime.main\n\t/opt/hostedtoolcache/go/1.14.13/x64/src/runtime/proc.go:203\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.14.13/x64/src/runtime/asm_amd64.s:1373"}
main.main
	/home/runner/work/argo-events/argo-events/eventsources/cmd/main.go:59
runtime.main
	/opt/hostedtoolcache/go/1.14.13/x64/src/runtime/proc.go:203

Expected behavior Consume SQS messages

Environment (please complete the following information):

  • Kubernetes: v1.16.15-eks-ad4801
  • Argo Events: v1.2.2

Additional context Webhooks are working without any problems


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 8
  • Comments: 23 (7 by maintainers)

Most upvoted comments

Thanks @phelinor . Even I was facing the same issue.

I recommend you to create secrets with command like following instead of doing encoding by yourself.

kubectl create secret generic ssh-key-secret --from-file=ssh-privatekey=/path/to/.ssh/id_rsa --from-file=ssh-publickey=/path/to/.ssh/id_rsa.pub