Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upbound_uxp: filter one pod per replicaSet (ECOINT-108) #2606

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewertonhm
Copy link

what does this PR do?

This PR introduces a feature flag (filter_one_pod_per_replica) to allow filtering of only one pod per ReplicaSet for metric collection in Kubernetes environments. This change helps avoid duplicate metrics when multiple pods from the same ReplicaSet are running on the same node. The default behavior is to collect metrics from all pods.

motivation

The motivation for this change is to enhance metric collection efficiency in environments where high availability is configured with multiple pods per ReplicaSet, avoiding the collection of duplicate data from pods running on the same node.

Review checklist

  • PR has a meaningful title or PR has the no-changelog label attached
  • Feature or bugfix has tests
  • Git history is clean
  • If PR impacts documentation, docs team has been notified or an issue has been opened on the documentation repo
  • If this PR includes a log pipeline, please add a description describing the remappers and processors.

Additional Notes

  • The new feature flag filter_one_pod_per_replica is added to the configuration file, defaulting to false. When enabled, only one pod per ReplicaSet will be selected for metrics collection.
  • This change helps ensure that metric collection is more efficient in environments with multiple pods running on the same node, reducing the chances of duplicate metrics being collected.

@ewertonhm ewertonhm requested a review from a team as a code owner February 17, 2025 18:24
@ewertonhm
Copy link
Author

#2605 fixing this issue

@dd-dominic dd-dominic changed the title upbound_uxp: filter one pod per replicaSet upbound_uxp: filter one pod per replicaSet (ECOINT-108) Feb 19, 2025
Copy link
Contributor

@iliakur iliakur left a comment

Choose a reason for hiding this comment

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

@humoflife what do you think?

@humoflife
Copy link
Contributor

@ewertonhm Which scenarios are you looking to cover by using multiple Crossplane pods?

Note that Kubernetes would launch a new pod in the event that the node is preempted where the current Crossplane pod runs. Moving to the new pod will not impact resource reconciliation differently compared to switching to a pre-existing inactive pod.

If you were to continue to use 2 pods, would the pod filtering in your PR deterministically select the active Crossplane pod?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants