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

Boskos does not allow duplicate resource name even for different types #15054

Closed
amwat opened this issue Nov 1, 2019 · 16 comments
Closed

Boskos does not allow duplicate resource name even for different types #15054

amwat opened this issue Nov 1, 2019 · 16 comments
Labels
area/boskos Issues or PRs related to code in /boskos kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@amwat
Copy link
Contributor

amwat commented Nov 1, 2019

resources:
- type: bar
  names: 
  - foo
- type: qwe
  names:
  - foo

results in {"error":"duplicated resource name: foo","level":"fatal","msg":"failed to create ranch!" }

This seems like something we should support?

/cc @krzyzacy @ixdy @sebastienvas

@amwat amwat added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 1, 2019
@krzyzacy
Copy link
Member

krzyzacy commented Nov 1, 2019

no the CRDs cannot have the same name, unless we change CRDs to $name_$type

@amwat
Copy link
Contributor Author

amwat commented Nov 1, 2019

yeah, was imagining something similar

@krzyzacy
Copy link
Member

krzyzacy commented Nov 1, 2019

easier just name them that way :-)

@amwat
Copy link
Contributor Author

amwat commented Nov 1, 2019

Eh, technically my job just cares about the name. I shouldn't need to split string etc. to get it.
whereas the CRD naming scheme is arbitrary.

@ixdy
Copy link
Member

ixdy commented Nov 1, 2019

I agree that this is something we should support.

/area boskos

@k8s-ci-robot k8s-ci-robot added the area/boskos Issues or PRs related to code in /boskos label Nov 1, 2019
@krzyzacy
Copy link
Member

krzyzacy commented Nov 1, 2019

feel free to decouple the internal naming scheme from config :-)

@lilinji
Copy link

lilinji commented Nov 5, 2019

/area boskos

@stevekuznetsov
Copy link
Contributor

Let's not flatten structured data into strings for naming on the CRDs. Can we use other unique identifiers?

@ixdy
Copy link
Member

ixdy commented Nov 19, 2019

We could possibly move the name of the resource (from the ConfigMap) to the spec and then use an autogenerated name for the actual kubernetes object (possibly based on the resource name).

The kubernetes object name can only be up to 253 characters long, and can only contain digits, lower-case letters, -, and .. So it definitely does not make sense to try to put the resource type into the object name.

@sebastienvas
Copy link
Contributor

what s wrong with using a hash from (type, name), the only issue is that any change like is backward incompatible, so might need to migrate your resources.

@ixdy
Copy link
Member

ixdy commented Nov 20, 2019

it's nicer to manually list resources if they have human-readable names (instead of hashes or UUIDs).

OTOH, not using the name at all (or obfuscating it) would allow names that don't match the strict DNS requirements. (Not an issue at the moment, but maybe it could be someday - e.g. what if you wanted to list service account names which included @ symbols?)

@ixdy
Copy link
Member

ixdy commented Jan 16, 2020

passing thought: /acquirebystate currently assumes that all resources have unique names. We'd have to modify this API (in some backwards-compatible way?) to allow specifying types as well.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 15, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 15, 2020
@ixdy
Copy link
Member

ixdy commented May 29, 2020

Moving this issue to kubernetes-sigs/boskos#14.
/close

@k8s-ci-robot
Copy link
Contributor

@ixdy: Closing this issue.

In response to this:

Moving this issue to kubernetes-sigs/boskos#14.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/boskos Issues or PRs related to code in /boskos kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

8 participants