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

Why does a Tekton resource cannot contain a dot? #3891

Closed
goldmann opened this issue Apr 19, 2021 · 3 comments · Fixed by #3893
Closed

Why does a Tekton resource cannot contain a dot? #3891

goldmann opened this issue Apr 19, 2021 · 3 comments · Fixed by #3893
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@goldmann
Copy link

I see this validation being enforced on Tekton resources:

if strings.Contains(name, ".") {
return &apis.FieldError{
Message: "Invalid resource name: special character . must not be present",
Paths: []string{"name"},
}
}
A dot is a a perfectly valid character within the resource name as per Kubernetes docs. Why Tekton does not allow for dots in resource names?

Dots are generally very useful, for example in cases where you would like to have versions as part of the name.

@vdemeester
Copy link
Member

/kind feature

If it's valid for kubernetes, I don't see why we block this indeed. Looking at https://github.com/tektoncd/pipeline/blame/0cb2bf09f1a2ebc30e833d3e64a38b61858be51c/pkg/apis/pipeline/v1alpha1/metadata_validation.go, seems like it's been there since the start of the project (as part of the skeleton).

/cc @tektoncd/core-maintainers

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 19, 2021
@imjasonh
Copy link
Member

It goes back even further, to Knative Build days. Digging even further, this check seems to show up for the first time in knative/build#181, written by a rather untrustworthy looking character named @imjasonh 🤔

I agree with @vdemeester that this is probably unnecessary and can be removed so .s are allowed.

@psschwei
Copy link
Contributor

/assign @psschwei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants