Skip to content
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

when using ${project.artifactId} for the service/DC/RC metadata.name we should trim to 24 characters #206

Closed
jstrachan opened this issue Aug 2, 2016 · 5 comments
Labels
status/stale Issue/PR considered to be stale

Comments

@jstrachan
Copy link
Contributor

if an archetypeId is too long we should automatically trim it to avoid creating an invalid kubernetes/openshift set of resources

@jstrachan
Copy link
Contributor Author

we might want to also convert to lowercase and remove any invalid characters too

@rhuss
Copy link
Contributor

rhuss commented Aug 2, 2016

We already have the truncation when creating the default resource names.

We can add even more name mangling here. Are there any other spots where this should be done ?

@jstrachan
Copy link
Contributor Author

jstrachan commented Aug 2, 2016

so in the new arquillian system tests for the quickstarts I was getting failures - due to Service metadata.name being too big for a few of the quickstarts. I worked around it for now by manually truncating the artifactId:
https://github.com/fabric8io/ipaas-quickstarts/blob/master/archetype-itests/src/test/java/io/fabric8/tooling/archetype/generator/ArchetypeTest.java#L229-L230

I suspect the failure is probably that we don't truncate the yaml files such as this:
https://github.com/fabric8-quickstarts/cdi-cxf/blob/master/src/main/fabric8/service.yml

i.e. we maybe wanna check we're doing the truncation when we post process partial yaml files

@astefanutti
Copy link
Contributor

Note that service names up to 63 characters will be allowed in Kubernetes v1.4 (from RFC-952 to RFC-1035) as per kubernetes/kubernetes#29523.

So we should ideally adjust to that new limit at some point and this will come handy with longer names like quickstart names.

@stale
Copy link

stale bot commented Oct 4, 2018

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@stale stale bot added the status/stale Issue/PR considered to be stale label Oct 4, 2018
@stale stale bot closed this as completed Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/stale Issue/PR considered to be stale
Projects
None yet
Development

No branches or pull requests

3 participants