Skip to content

Commit

Permalink
Add SQS Custom endpoint support (argoproj#1632)
Browse files Browse the repository at this point in the history
* feat: Add support for custom SQS endpoints

Signed-off-by: itamarom <[email protected]>
  • Loading branch information
itamarom authored and BulkBeing committed Mar 7, 2022
1 parent 547343f commit d1558ac
Show file tree
Hide file tree
Showing 9 changed files with 479 additions and 389 deletions.
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/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 @@ -646,6 +646,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

0 comments on commit d1558ac

Please sign in to comment.