Skip to content

Shard lease names might conflict between multiple namespaces #430

@timebertt

Description

@timebertt

What would you like to be added:

The sharding mechanism requires the shard lease names (i.e., controller instance identities) to be unique in a ring.
If there are multiple shard leases in different namespaces with the same name belonging to the same ring, this is likely a misconfiguration.
Typically, all controller instances of the same ring would reside in the same namespace and, thus, have non-conflicting names.
Alternatively, controller instances could belong to different rings and might use conflicting names with instances of other rings.

If – for whatever reason – there are multiple shards of the same ring with the same name in different namespaces, the sharder should handle this.
E.g., by adding an error condition to the ControllerRing status or annotating the Lease objects.
Instead of performing undesired rebalancing, the sharder should halt the sharding mechanism entirely until the conflicting names have been resolved.

The documentation should be updated to mention this requirement for controllers implementing sharding.
If someone wants to run controller instances of the same ring in different namespaces, they can do so by using unique shard names.

Why is this needed:

Having conflicting shard lease names sounds like an edge case to me and I don't think it restricts any reasonable scenarios.
Still, we should confusion and undesired sharder actions when running into such a situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions