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

ScaledObject labels increase character size #717

Closed
jocelynthode opened this issue Jun 21, 2023 · 0 comments · Fixed by #721
Closed

ScaledObject labels increase character size #717

jocelynthode opened this issue Jun 21, 2023 · 0 comments · Fixed by #721
Labels
bug Something isn't working

Comments

@jocelynthode
Copy link
Contributor

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

@jocelynthode jocelynthode added the bug Something isn't working label Jun 21, 2023
@jocelynthode jocelynthode mentioned this issue Jun 21, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant