kubestellar / kubestellar

KubeStellar - a flexible solution for challenges associated with multi-cluster configuration management for edge, multi-cloud, and hybrid cloud
https://kubestellar.io
Apache License 2.0
260 stars 60 forks source link

bug: name problems for wrapped objects #1651

Open MikeSpreitzer opened 7 months ago

MikeSpreitzer commented 7 months ago

Describe the bug

PR #1588 is planning to create two problems with the names of wrapper objects.

  1. The length of the object name is not guaranteed to be short enough.
  2. The names are not guaranteed to be unique.

See https://github.com/kubestellar/kubestellar/pull/1588#pullrequestreview-1842942304 for more details.

Some details:

Steps To Reproduce

See above.

Expected Behavior

Such problems not present.

Additional Context

No response

ezrasilvera commented 5 months ago

Name collisions in the manifestwork name

ezrasilvera commented 5 months ago

@MikeSpreitzer (cc: @nirrozenbaum ) As far as I could see there is no restriction on a CP name in KubeFlex, so I'm not sure there is a separator we can use which is not allowed in C name. @pdettori, did I miss something ?

pdettori commented 5 months ago

@ezrasilvera I am missing the connection to the KubeaFlex ControlPlanes names, can you elaborate?

MikeSpreitzer commented 1 month ago

@pdettori: @ezrasilvera asked about restrictions on ControlPlane object names in KubeFlex because he wondered if there is a character that is forbidden there and allowed in a wrapped object name. The answer to that question is "no". In https://github.com/kubestellar/kubeflex/blob/ee326624021341a3d9053759cf39aef2ef99e6f9/config/crd/bases/tenancy.kflex.kubestellar.org_controlplanes.yaml#L53-L54 you see no constraints on the name of an object, and in the kustomization you see none added.

FYI, for a CRD that adds no constraints on object names, the baseline applies. I have been struggling to get that clearly documented, see https://github.com/kubernetes/website/pull/46263 . Unless further constrained by the OpenAPI schema, the name of an object whose kind/resource is defined by a CRD must be a valid DNS subdomain name.