chore: improve the operator deployment detection
Using the Deployment object from the Kubernetes environment we can get all the information for the deployment more accurate than just listing and counting pods, which it's an issue when you have another pod in the same namespace.
Closes #4426
:exclamation: By default, the pull request is configured to backport to all release branches.
- To stop backporting this pr, remove the label: backport-requested :arrow_backward: or add the label 'do not backport'
- To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y
/test feature_type=operator test_level=4
@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8985522953
/test feature_type=operator test_level=4
@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8987412660
@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/8987414033
E2e tests: https://github.com/EnterpriseDB/cloudnative-pg/actions/runs/9095564599
/test feature_type=operator test_level=4 limit=local depoth=schedule
@sxd, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/9098443345
/test feature_type=operator test_level=4 limit=local depoth=schedule
@sxd, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/9098860101