opensearch-project / opensearch-k8s-operator

OpenSearch Kubernetes Operator
Apache License 2.0
365 stars 192 forks source link

Fix rollingRestart reconcile for multiple same named clusters #836

Open OlegVanHorst opened 1 month ago

OlegVanHorst commented 1 month ago

Description

Fixes a bug where reconcile breaks, if there are multiple same named OpensearchClusters in different namespaces. The rollingRestart reconciler selects pods in all namespaces when evaluating if the Pods are healthy and matches them with the desired replicas. Only pods in the own namespace should be checked.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

swoehrl-mw commented 4 weeks ago

Hi @OlegVanHorst. Thanks for noticing this and providing a fix. Would you mind extending your PR and also making the same fix for the CountPVCsForNodePool function (line 284)? That list should have the same problem.