node-ttl icon indicating copy to clipboard operation
node-ttl copied to clipboard

nodePoolName pattern should be customizable

Open tothadi opened this issue 2 years ago • 4 comments

The pattern for nodePoolName is currently hardcoded which prevents us from using this tool. Our ASGs doesn't have the "eks-" prefix in their names and renaming them would be a major pain in the a**.

tothadi avatar Feb 21 '24 14:02 tothadi

I see. Can you share what pattern you would like for your specific case? I'm trying to understand if the best way to address this would be to allow configuring the whole pattern, or whether the pattern should be amended (presumably with the UUID pattern)?

bittrance avatar Feb 23 '24 10:02 bittrance

Thanks for picking up on this. E.g. we have an ASG with the name k8s_stage2-bd-scanner-12022110415025032090000000a and we got the runtime error:

"error":"could not find status for node pool: eks-k8s_stage2-bd-scanner-12022110415025032090000000a-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"

IMO the whole pattern should be configurable.

tothadi avatar Feb 23 '24 11:02 tothadi

I've created a quick PR according to the feature description provided by @tothadi.

https://github.com/XenitAB/node-ttl/pull/76

This should make the use case more clear.

TheDoctor028 avatar Feb 27 '24 12:02 TheDoctor028

Sorry for being late in the game. I am trying to figure out if I have done something wrong with the AWS specific handling that we should modify instead.

@TheDoctor028 your PR is it adding custom labeling for AWS specifically or some other cloud provider?

If we can the best option would be to just add specific support for each cloud provider.

phillebaba avatar Mar 25 '24 09:03 phillebaba