Skip to content

bug: cannot handle objects in kcp with extremely long names #34

@xrstf

Description

@xrstf

Describe the bug

I setup the agent to sync some of my APIs. Then I created an object in my workspace with this name:

abcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcdefgancabcds

kcp accepted it, but when the agent tries to sync it, it runs into issues when following the labels to find the owning object:

unable to parse requirement: values[0][syncagent.kcp.io/remote-object-name]: Invalid value: "......": must be no more than 63 character

Steps To Reproduce

See above.

Expected Behaviour

The agent needs to handle all possible names / lengths that are acceptable in Kubernetes/kcp. This has nothing to do with the projection/mutation/naming rules that an admin could configure, this is all about internal housekeeping, and so should be fixed in the agent.

Additional Context

I would imagine the agent needs to begin to hash object namespaces/names and potentially store the original values as annotations (where there are no length restrictions) so that it can still make a connection from service cluster to kcp.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions