Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Provide guidance on requirements for application name uniqueness #145

Open
sympatheticmoose opened this issue Nov 10, 2021 · 5 comments
Open
Assignees

Comments

@sympatheticmoose
Copy link
Contributor

links to weaveworks/weave-gitops#1045 and weaveworks/weave-gitops#1057

@sympatheticmoose
Copy link
Contributor Author

@palemtnrider would appreciate if you could take this :)

@palemtnrider
Copy link
Contributor

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.

@palemtnrider
Copy link
Contributor

palemtnrider commented Jan 21, 2022

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 _.

@palemtnrider
Copy link
Contributor

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

@bigkevmcd
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants