You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’d like to use more descriptive names which is another issue.
In the future we'll have plenty of RepoSync objects deployed to the cluster so we need to have good naming convention for them.
When using longer, more descriptive names we're facing following error:
Deployment.apps "ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8" is invalid: [spec.selector.matchLabels: Invalid value: "ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8": must be no more than 63 characters, spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"reconciler", "configsync.gke.io/deployment-name":"ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: invalid label selector]
Deployment name is build from following pieces: ns-reconciler-${namespace}-${reposyncname}-${number}
Given that namespace and reposync names can be up to 63 characters it's not easy for reconcilers deployments to have names shorter than 63 characters which is combination of elements mentioned before.
In our implementation we would like label selector to be able to accept labels longer than 63 characters.
We are aware that changing label character limit is a deep change in Kubernetes so our alternative request is to use different label selector in the process.
The reconciler Deployment name and RootSync/RepoSync names are used as label values in a few places, which are constrained to 63 characters, as you mentioned.
Removing the deployment-name label would be required in order to fulfill this request.
AFAIK, we use the deployment-name label for a few things:
Pod selection in tests
Pod log selection in docs & examples
Metric property injection via the otel-agent sidecar environment variables
You can also select deployment logs with kubectl logs -f deployment/NAME -n NAMESPACE, but we also use the label for pod selection in tests rather a lot.
We should add a limit to the RootSync/RepoSync CRDs, to move enforcement forward to RSync object creation time, but that won't directly fix the issue with the deployment-name needing it to be shorter than 63 characters.
karlkfi
changed the title
RepoSync: Label character limit at 63
Feature Request: Increase max RepoSync name length to 63 characters
Jan 24, 2025
RepoSync: Label character limit at 63
We’d like to use more descriptive names which is another issue.
In the future we'll have plenty of RepoSync objects deployed to the cluster so we need to have good naming convention for them.
When using longer, more descriptive names we're facing following error:
Deployment.apps "ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8" is invalid: [spec.selector.matchLabels: Invalid value: "ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8": must be no more than 63 characters, spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"reconciler", "configsync.gke.io/deployment-name":"ns-reconciler-abcd-1234567-asddffgh000-xyz-asdfghjt-abc-reposync-8"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: invalid label selector]
Deployment name is build from following pieces: ns-reconciler-${namespace}-${reposyncname}-${number}
Given that namespace and reposync names can be up to 63 characters it's not easy for reconcilers deployments to have names shorter than 63 characters which is combination of elements mentioned before.
In our implementation we would like label selector to be able to accept labels longer than 63 characters.
We are aware that changing label character limit is a deep change in Kubernetes so our alternative request is to use different label selector in the process.
https://cloud.google.com/anthos-config-management/docs/reference/labels-and-annotations
The text was updated successfully, but these errors were encountered: