-
Notifications
You must be signed in to change notification settings - Fork 944
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
Truncate cronjob name at 52 characters #1208
Conversation
Can you add a simple unit test for your new function? And maybe call it trim and not truncate? |
6cb7a04
to
e3d378c
Compare
Done |
We see several objects where the cluster name length is a problem. Internally we have discussed other options also to ensure uniqueness for child objects, e.g. the connection pooler deployment potentially leveraging the "uid" of the CRD object. But that also does not look nice in kubectl or other tools. Just stripping it short may be a good start, but maybe not the best final solution. |
I see and understand that this is not the ideal solution. However, for us this is currently a bug which affects us and we cannot enable backups for one of our DBs without re-deploying it with a shorter name... |
Any news on this? |
@FxKu That's a good workaround but there could still be situations where the name is too long. In any case I updated my PR and fixed the merge conflicts. If you want you can still consider it. Otherwise I would suggest that we close it. |
👍 |
1 similar comment
👍 |
Thanks @mseiwald for your contribution. You're right, it could happen that the name is still too long. |
K8s cronjobs must be no longer than 52 characters. This fixes the issue of backup cronjobs not being created for DBs with long names.