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

No tags on SQS queues #708

Closed
sj26 opened this issue Sep 16, 2020 · 5 comments
Closed

No tags on SQS queues #708

sj26 opened this issue Sep 16, 2020 · 5 comments

Comments

@sj26
Copy link
Member

sj26 commented Sep 16, 2020

The elastic stack creates SQS queues as part of its lifecycle handling through lifecycled:
https://github.com/buildkite/lifecycled/blob/74e330d38ba66da736591209b38fc218a15a7c8a/queue.go#L72-L78

But these queues are created without tags. Most resources created by the stack either have a tag reflecting the stack name:

Tags:
- Key: Name
Value: !Ref 'AWS::StackName'

or the cost allocation tags:

- Label:
default: Cost Allocation Configuration
Parameters:
- EnableCostAllocationTags
- CostAllocationTagName
- CostAllocationTagValue

Tags:
- !If
- UseCostAllocationTags
- Key: !Ref CostAllocationTagName
Value: !Ref CostAllocationTagValue
- !Ref "AWS::NoValue"

We should propagate these to the queues created by lifecycled so that customers can track these created resources against the stack for audit and cost purposes.

There's already a relevant issue on lifecycled as well:
buildkite/lifecycled#17

@yob
Copy link
Contributor

yob commented Sep 22, 2020

Looking at the lifecycled code, it seems to create the SQS queues to catch and handle ASG-initiated scale down terminations.

However, on master the ASG never initiates a scale down. Each instance self-terminates and reduces the ASG desired count by 1. Could we configure lifecycled to skip the SQS queue creation when we only need to monitor for spot instance termination?

@sj26
Copy link
Member Author

sj26 commented Sep 22, 2020

I did a little look-see if we could remove it, and thought maybe we couldn't because of spot instances?

@yob
Copy link
Contributor

yob commented Sep 22, 2020

I've never worked with lifecycled, but it looks like the impending spot termination notifications are implemented as a polling loop against the instance metadata:

https://github.com/buildkite/lifecycled/blob/74e330d38ba66da736591209b38fc218a15a7c8a/spot.go#L46-L80

paging @lox

@lox
Copy link
Contributor

lox commented Sep 22, 2020

Correct, at this stage we only use lifecycled for gracefully handling spot termination notices. We can ditch all the sqs/sns lifecycle event stuff (I actually thought I had already).

@chloeruka
Copy link
Contributor

Closing this as we don't have SQS resources anymore. #135 #829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants