project-codeflare / instascale

On-demand Kubernetes/OpenShift cluster scaling and aggregated resource provisioning
Apache License 2.0
10 stars 20 forks source link

NodePool and MachinePool name character limit #143

Closed VanillaSpoon closed 9 months ago

VanillaSpoon commented 1 year ago

Describe the Bug

Machine pool names on openshift must be under 30 characters long, whilst for NodePools on HyperShift the character limit is 15. Failing to produce a name under the character limit will prevent scaling up.

The name is generated as so within instascale: machinePoolID := strings.ReplaceAll(aw.Name+"-"+userRequestedInstanceType, ".", "-")

This does not provide a user with feedback as to whether the name is under 30 characters when trying to scale up, and therefore may be overseen, as they can still create the appwrapper without failing.

For example, creating an appwrapper with the name: machinepool-scaleup-example will succeed, however the machinepoolID may be set to machinepool-scaleup-example-g4dn-xlarge which will not scale as it is over the character count.

Suggestions could be to: