feat(src/sqs): customizable serviceAccount name#1309
Conversation
|
Hi may I ask why this PR has been closed? For me this looks like a helpful feature and a great contribution. |
|
cc/ @tzununbekov can you comment ? |
|
We delayed the merge because we didn't really want to add features through the objects annotations rather than CRD parameters - once annotation introduced, we should keep it mind for compatibility and consistency in future versions. However, as Antoine noted, it should be easy to add as a part of the object's specification. I'll take a look at it. |
|
Yes I can fully understand these points. It is always hard to change an interface description, even if it was declared as alpha. Another question regarding this change: Currently the creation of the ServiceAccount is always controlled by TriggerMesh. Would it be possible to reference an existing ServiceAccount (created externally) and completely disable the creation of the ServiceAccount in TriggerMesh. |
|
Closing the PR was my mistake, I cleared my fork and this happened due to removing the associated branch. |
Context
Users have been expressing concerns regarding the usage of the IAM role auth feature of AWS sources (#248 (comment)).
Per Amazon's design, users must create one IAM Role and one Trust Relationship per Service Account (hence, per source instance). This is quite a tedious process, and for some people it is just fine to use a shared serviceAccount for selected sources.
Proposal
This PR introduces an alpha feature — currently only enabled in the event source for Amazon SQS (
AWSSQSSourcekind) — which allows overriding the name of the service account by annotating the source object withalpha.triggermesh.io/aws-iam-service-account: <service account name>.I have no intention to introduce API changes here. An annotation is easier to test and less intrusive.
If it works, implementing this "properly" inside CRDs will be trivial.
Demo
Caveats
ownerReferencesof the serviceAccount will always be updated to the last reconciled source that uses this serviceAccount.Because this is an alpha, undocumented feature, I believe that none of the above caveats should prevent its testing.
cc. @sebgoa