turbonomic / kubeturbo

140 stars 75 forks source link

[TRB-44809]: Removed "placed" flag. Updated short-circuit IF statement. #914

Closed amd-ibm closed 1 year ago

amd-ibm commented 1 year ago

Intent

Fix an issue where Reconfigure actions are not generating when there is no supplier for an affinity commodity.

Background

Recent changes to affinity processing broke the logic that would cause Reconfigure actions in the following scenarios:

Testing

Ran kubeturbo against ROSA cluster and tested the following scenarios:

Pod-to-Node Affinity

Deployed a WorkloadController with node affinity. Once Pod was Running, removed the label from the node, ran rediscovery and broadcasted. Verified that a Reconfigure action is generated.

Screenshot 2023-08-08 at 4 13 59 PM

Pod-to-Pod Affinity

Deployed a WorkloadController with affinity to a bare Pod. Once they were running, removed the bare Pod, ran rediscovery and broadcasted. Verified that a Reconfigure action is generated.

Screenshot 2023-08-08 at 4 16 46 PM

Checklist

These are the items that must be done by the developer and by reviewers before the change is ready to merge. Please strikeout any items that are not applicable, but don't delete them

Audience

@irfanurrehman @andreiastra

pankajbatra1 commented 1 year ago

Can you please verify the behavior once the removed label/bare pod is brought back?

amd-ibm commented 1 year ago

Can you please verify the behavior once the removed label/bare pod is brought back?

@pankajbatra1 , I verified that both reconfigure actions disappear if the label is added back, or the pod to which the workload has affinity is recreated.