-
Notifications
You must be signed in to change notification settings - Fork 767
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
[feature request] Make CloneSet and StatefulSet Support the generateName setting #1627
Comments
Hi @furykerry , I can work on this issue, can you assign me? |
/assign @Radeity |
Hi @iambocai , I've tested this issue, actually, the limit is not pod name, but the length of For this issue, there's already a feature gate to handle it, you can set Related code logic: kruise/pkg/controller/cloneset/utils/cloneset_utils.go Lines 71 to 79 in 89d9558
Thus, it seems like no need to make any changes to codes. cc @furykerry |
@Radeity although short cloneset hash can be helpful to break the name length limit, it is still beneficial to support generateName field which is a more common way to handle this problem |
Hi @furykerry , thanks for your reply. If I understand correctly, in this feat, we should support to use CloneSet/StatefulSet's |
yes, just replace the prefix with generateName if available |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
What would you like to be added:
To make CloneSet and StatefulSet support the GenerateName setting.
Why is this needed:
Currently, CloneSet rigidly uses
{workloadName}-{randomID}
when generatingpod.Name
. There is a risk here as workload names can be up to 253 bytes long, while pod names are limited to 63 bytes. Therefore, if the user-defined workload name exceeds 57 bytes, the resulting pod name will exceed the limit and become unusable. The general solution to this problem is to specifyGenerateName
, but our current implementation of CloneSet does not support this feature. This leaves users facing such issues with no option but to shorten the workload name, which compromises readability and is not a good solution from a management standpoint. Therefore, I hope that support for theGenerateName
setting can be incorporated.kruise/pkg/controller/cloneset/core/cloneset_core.go
Line 98 in a836e90
The requirements for StatefulSet would be similar.
The text was updated successfully, but these errors were encountered: