Open sympatheticmoose opened 2 years ago
@palemtnrider would appreciate if you could take this :)
The approach we should take is to follow the DNS label names - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names. This gives us the ability to add characters to object names (if needed) and allows us to use the application name as a label value without modification. If we believe 63 characters isn't enough for application names, we should follow the DNS subname restrictions but we lose the benefits I mentioned above.
This does mean we won't be able to accept all repository names w/o modifications. From some limited testing, it appears that github will accept 100 character names, Mixed case, including -.and _.
Helm also recommends names similarly to dns-label-names https://helm.sh/docs/chart_best_practices/conventions/#chart-names and limits them to 53 characters https://github.com/helm/helm/blob/main/pkg/chartutil/validate_name.go
I'd agree with @palemtnrider and probably go with the full 63 characters validated with https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Label
links to https://github.com/weaveworks/weave-gitops/issues/1045 and https://github.com/weaveworks/weave-gitops/issues/1057