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

Add SQS Custom endpoint support #1632

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Organizations below are **officially** using Argo Events. Please send a PR with
1. [Helio](https://helio.exchange)
1. [InsideBoard](https://www.insideboard.com)
1. [Intuit](https://www.intuit.com/)
1. [Loam](https://www.getloam.com/)
1. [Mobimeo GmbH](https://mobimeo.com/en/home/)
1. [OneCause](https://www.onecause.com/)
1. [Produvar](https://www.produvar.com/)
Expand Down
12 changes: 12 additions & 0 deletions api/event-source.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions api/event-source.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2212,6 +2212,10 @@
"description": "DLQ specifies if a dead-letter queue is configured for messages that can't be processed successfully. If set to true, messages with invalid payload won't be acknowledged to allow to forward them farther to the dead-letter queue. The default value is false.",
"type": "boolean"
},
"endpoint": {
"description": "Endpoint configures connection to a specific SQS endpoint instead of Amazons servers",
"type": "string"
},
"filter": {
"$ref": "#/definitions/io.argoproj.eventsource.v1alpha1.EventSourceFilter",
"description": "Filter"
Expand Down
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion eventsources/sources/awssqs/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byt
return errors.Wrapf(err, "failed to create aws session for %s", el.GetEventName())
}

sqsClient := sqslib.New(awsSession)
var sqsClient *sqslib.SQS

if sqsEventSource.Endpoint == "" {
sqsClient = sqslib.New(awsSession)
} else {
sqsClient = sqslib.New(awsSession, &aws.Config{Endpoint: &sqsEventSource.Endpoint, Region: &sqsEventSource.Region})
}

log.Info("fetching queue url...")
getQueueURLInput := &sqslib.GetQueueUrlInput{
Expand Down
816 changes: 428 additions & 388 deletions pkg/apis/eventsource/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/apis/eventsource/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/apis/eventsource/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/apis/eventsource/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ type SQSEventSource struct {
// Filter
// +optional
Filter *EventSourceFilter `json:"filter,omitempty" protobuf:"bytes,11,opt,name=filter"`
// Endpoint configures connection to a specific SQS endpoint instead of Amazons servers
// +optional
Endpoint string `json:"endpoint" protobuf:"bytes,12,opt,name=endpoint"`
}

// PubSubEventSource refers to event-source for GCP PubSub related events.
Expand Down