Skip to content

Noobaa/Backingstore : Need facility to change labels#1489

Merged
aspandey merged 1 commit intonoobaa:masterfrom
aspandey:backingstore-labels
Jan 9, 2025
Merged

Noobaa/Backingstore : Need facility to change labels#1489
aspandey merged 1 commit intonoobaa:masterfrom
aspandey:backingstore-labels

Conversation

@aspandey
Copy link

We need to allow to modify the matchLabel of
topologySpreadConstraints for noobaa's backingstore pods.

https://issues.redhat.com/browse/DFBUGS-277

Testing -
1 - Create a backing store.
2 - Check the label for backingstore and also the pod

kubectl get backingstore my-backingstore -o yaml
kubectl describe pod my-backingstore-noobaa-pod-c2348d65

3 -
Change the label of a backingstore object like this -
kubectl label backingstore my-backingstore backingstore=noobaa-new --overwrite
This will trigger the reconciliation and the pod will be reinitialize and now have a "backingstore=noobaa-new" as label

@aspandey aspandey force-pushed the backingstore-labels branch from b7f49cc to 7225cfa Compare January 6, 2025 10:43
@aspandey aspandey force-pushed the backingstore-labels branch 2 times, most recently from 1659838 to 8971095 Compare January 9, 2025 06:03
Comment on lines +1316 to +1319
bs_label, ok := r.BackingStore.Labels["backingstore"]
if !ok || bs_label == "" {
bs_label = "noobaa"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bs_label, ok := r.BackingStore.Labels["backingstore"]
if !ok || bs_label == "" {
bs_label = "noobaa"
}
bs_label := r.BackingStore.Labels["backingstore"]
if bs_label == "" {
bs_label = "noobaa"
}

Just a small suggestion, I think it will return zero "" value if the label is not defined so we can update it.

Copy link
Member

@aayushchouhan09 aayushchouhan09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aspandey aspandey force-pushed the backingstore-labels branch from 8971095 to 4a29b59 Compare January 9, 2025 06:57
@aspandey aspandey force-pushed the backingstore-labels branch 2 times, most recently from 6fde234 to 79e3fb0 Compare January 9, 2025 07:40
We need to allow to modify the matchLabel of
topologySpreadConstraints for noobaa's backingstore pods.

https://issues.redhat.com/browse/DFBUGS-277

Signed-off-by: Ashish Pandey <aspandey@redhat.com>
@aspandey aspandey force-pushed the backingstore-labels branch from 79e3fb0 to 6d562a0 Compare January 9, 2025 08:29
@aspandey aspandey merged commit 15f7a29 into noobaa:master Jan 9, 2025
@aspandey aspandey deleted the backingstore-labels branch January 9, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants