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

Label Propagation Issue with HarborCluster StatefulSets #1099

Open
anushkaa2607 opened this issue Dec 8, 2024 · 0 comments
Open

Label Propagation Issue with HarborCluster StatefulSets #1099

anushkaa2607 opened this issue Dec 8, 2024 · 0 comments

Comments

@anushkaa2607
Copy link

Description

The Harbor Operator currently propagates all labels from HarborCluster to the StatefulSets it manages. This behavior can lead to issues when these labels conflict with the immutable selectors of the StatefulSet, causing update failures.

The underlying Redis Operator, used by Harbor Operator, provides a label whitelisting feature via spec.LabelWhitelist in the API to control which labels are propagated to the StatefulSet. However, the Harbor Operator is not currently utilizing this feature.

What would you like to be added

Modify the Harbor Operator to leverage the Redis Operator's spec.LabelWhitelist feature to help filter out labels being propagated from resources to StatefulSet selectors.

Why is this needed

  • StatefulSet Immutability: Kubernetes enforces the immutability of StatefulSet selectors, i.e. they can’t be updated

  • Update Failures: Attempting to update a StatefulSet with extra selector labels results in errors, hindering management operations.

  • Flexibility: Decoupling template labels and selectors provides greater flexibility in managing StatefulSets. It will allow us to get clear distinction between labels used for resource identification and those applied for organizational purposes.

References
Kubernetes Issue: kubernetes/kubernetes#90519 (Discusses the immutability of StatefulSet selectors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant