Closed
Description
Report
When creating and/or converting a ScaledObject, it adds an app
labels which is prefixed with kedahttp-<SO.name>
. If the name is close to the 63 character limits imposed by Kubernetes this has the potential of breaking the creation of the ScaledObject.
This is even worse when converting from 0.4.0 which already added a -app
suffix. Now the label looks like kedahttp-<SO.name>-app
.
Expected Behavior
The app
label should have a value matching the ScaledObject
name exactly.
Actual Behavior
The app
label is concatenated with a prefix
Steps to Reproduce the Problem
1.Create an HTTPSO with a really long name.
2. The ScaledObject won't be created due to hitting the 63 characters limit
3.
Logs from KEDA HTTP operator
{"log":"2023-06-21T15:29:32Z\u0009ERROR\u0009controllers.HTTPScaledObject\u0009Creating ScaledObject\u0009{\"HTTPScaledObject.Namespace\": \"example\", \"HTTPScaledObject.Name\": \"example-name-that-must-be-really-long-to-showcase-potential-problems-with-the-limit\", \"reconciler.appObjects\": \"addObjects\", \"HTTPScaledObject.name\": \"example-name-that-must-be-really-long-to-showcase-potential-problems-with-the-limit\", \"HTTPScaledObject.namespace\": \"example\", \"error\": \"ScaledObject.keda.sh \\\"example-name-that-must-be-really-long-to-showcase-potential-problems-with-the-limit-app\\\" is invalid: metadata.labels: Invalid value: \\\"kedahttp-example-name-that-must-be-really-long-to-showcase-potential-problems-with-the-limit-app\\\": must be no more than 63 characters\"}\n","stream":"stderr","time":"2023-06-21T15:29:32.676073483Z"}
HTTP Add-on Version
0.5.0
Kubernetes Version
1.25
Platform
None
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done