Open dasrecht opened 3 years ago
We no longer support Openshift.
This is also an issue on k8s after all https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
The name of a CronJob must be a valid DNS subdomain value, but this can produce unexpected results for the Pod hostnames. For best compatibility, the name should follow the more restrictive rules for a DNS label. Even when the name is a DNS subdomain, the name must be no longer than 52 characters. This is because the CronJob controller will automatically append 11 characters to the name you provide and there is a constraint that the length of a Job name is no more than 63 characters.
We also experience this issue for long cronjob names:
The CronJob "cronjob-cli-cronjobName" is invalid: metadata.name: Invalid value: "cronjob-cli-cronjobName": must be no more than 52 characters
cronjobName
Can you cap these names to 52 characters? The length depends on the container and cronjob name
Can you cap these names to 52 characters? The length depends on the container and cronjob name
Yes, we can probably truncate them and add a hash so the names remain unique
I'm already looking at template generation functions, so I'll flag this as something to resolve in that part of work.
Obviously the short term workaround is to choose a shorter name, but obviously not ideal.
Describe the bug
A long cronjob name can lead to failing deployments