-
Notifications
You must be signed in to change notification settings - Fork 361
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
Job names can have characters not allowed in Pod names, so fails when synced. #131
Comments
Very important topic. Thanks for opening this issue. I have thought about the length exceeding issue for any synced resource a few times before. Here is one idea I came up with: Potentially we should check if the sycned name would exceed the character limit and then instead of using the usual |
Name length is definitely a secondary issue in this case, but the primary reason it failed was that pesky ".". :-( |
Definitely. Just wanted to throw that in there since it may be a good occasion to generally talk about naming strategy for sync and how to address potential issues. |
I actually thought you already had some strategy for long names where it would truncate them at a certain point and replace just the trailing part of the name with a hash value. Couldn't you use that approach but apply it to just that segment of the generated name. That way could preserve as much of leading part of the name as possible. |
It seems like this was fixed in #135 - closing. |
A Kubernetes Job name appears to need to follow DNS Subdomain Names rules.
A Kubernetes Pod name when created directly appears to need to follow RFC 1123 Label Names rules.
When a Kubernetes Job is translated by the syncer to a Pod, it uses the original Job name for the Pod name, meaning that it can fail in the translation.
For example, original Job of:
can be created, but the Pod created fails with:
The syncer should encode the Pod name created from a Job to ensure that characters are valid and name length not exceeded.
Note that it seems that in an ordinary cluster, even though one can't use a "." in a Pod name, a Pod name generated indirectly via a Job can. Because though the syncer does it directly it must follow the more stringent rule.
The text was updated successfully, but these errors were encountered: