kinvolk / lokomotive

🪦 DISCONTINUED Further Lokomotive development has been discontinued. Lokomotive is a 100% open-source, easy to use and secure Kubernetes distribution from the volks at Kinvolk
https://kinvolk.io/lokomotive-kubernetes/
Apache License 2.0
321 stars 49 forks source link

AWS: Revisit name length limits #706

Open johananl opened 4 years ago

johananl commented 4 years ago

https://github.com/kinvolk/lokomotive/blob/e41922b7428ed2e0053779d4c3e528951be26910/pkg/platform/aws/aws.go#L264-L265

When trying to create a worker pool named johannes-test-pool1 I'm getting the following error:

ERRO[0000] <nil>: Worker pool name too long; Maximum length is 18  args="[]" command="lokoctl cluster apply"

I think this is way too limiting. Some AWS resources (e.g. ASG names) allow much long names. Perhaps we should handle the length limitation for each resource type individually e.g. by truncating the name if it's too long and/or by using some form of UUID which can be short and unique. Limiting everything based on the resource with the lowest limit isn't a good idea IMO.

invidian commented 4 years ago

Note: using UUID will decrease readability, which we would possibly like to have (as noted in #705). I'm personally in favor of just skipping the name field, as then AWS will generate the UUIDs for us, which seems to be the best case. We can then use tags to identify the resources, which is a good practice anyway.