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

pkg/apis: Support dropequal and keepequal relabel actions #5368

Merged

Conversation

slashpai
Copy link
Contributor

Fixes #5363

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Support dropequal and keepequal relabel actions

Fixes prometheus-operator#5363

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
@slashpai slashpai requested a review from a team as a code owner February 24, 2023 06:32
Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

From my side lgtm, but seeing so many || makes me wonder if there isn't a better approach to this code 🤔

@slashpai
Copy link
Contributor Author

From my side lgtm, but seeing so many || makes me wonder if there isn't a better approach to this code 🤔

ya but in prometheus repo as well they are taking same approach https://github.com/prometheus/prometheus/blob/ccea61c7bf1e6bce2196ba8189a209945a204c5b/model/relabel/relabel.go#L119-L124. IIUC its because its due to same requirement they are clubbed together.

Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

lgtm

@simonpasquier simonpasquier merged commit aeb1213 into prometheus-operator:main Feb 28, 2023
@slashpai slashpai deleted the support_new_relabel_cfg branch September 9, 2023 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support dropequal and keepequal actions in relabelings.
3 participants