GG
Size: a a a
GG
GG
GM
GG
GG
GG
def default_project_namespace(slug)
namespace_slug = "#{project.path}-#{project.id}".downcase
if cluster.namespace_per_environment?
namespace_slug += "-#{slug}"
end
Gitlab::NamespaceSanitizer.sanitize(namespace_slug)
end
GG
GG
GM
GG
GG
GG
GG
slugified =
if slugified.size > 24 || slugified != name
# Maximum length: 24 characters (OpenShift limitation)
shorten_and_add_suffix(slugified)
else
# Cannot end with a dash (Kubernetes label limitation)
slugified.chomp('-')
end
GM
GM
GM
GG
GM
GM