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
266 stars 60 forks source link

bug: `WantSingletonReportedState` vs partially overlapping destination sets #1755

Open MikeSpreitzer opened 7 months ago

MikeSpreitzer commented 7 months ago

Describe the bug

(A) The definition in https://github.com/kubestellar/kubestellar/blob/f49ab8cb97888035d4f2d6c47208627cd80ac297/api/control/v1alpha1/types.go#L49-L54 of the semantics of WantSingletonReportedState does not seem to contemplate the possibility of overlapping BindingPolicy objects that select different sets of WECs.

(B) The implementation chooses a single WEC independently per BindingPolicy. This means that for a single workload object in the WDS, the implementation can try (without explicitly recognizing it or dealing with it) to return the status from more than one WEC.

Steps To Reproduce

Read the interface. Read the implementation.

Consider the following scenario. BindingPolicy X binds objects A and B to WECs C1 and C2. BindingPolicy Y binds object B and C to WECs C2 and C3. Where do objects A, B, and C go? The current implementation sends object B to two WECs, if I understand it correctly.

Expected Behavior

The API should clearly define what happens even with partially overlapping BindingPolicy objects. The implementation should implement the definition.

Additional Context

No response

MikeSpreitzer commented 7 months ago

@clubanderson @dumb0002 @ezrasilvera

ezrasilvera commented 7 months ago

We first need to complete the definition through #1734