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

Feat: Add relabel_configs field to AlertmanagerEndpoints #6467

Merged

Conversation

mviswanathsai
Copy link
Contributor

Description

We don't support the relabel_configs per AM, along with ProxyConfig, FollowRedirects among other fields. We would like to extend support to these missing fields.

Partially closes: #6461

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)
  • [x ] 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.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.
Unit tests.

Changelog entry

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


@mviswanathsai mviswanathsai requested a review from a team as a code owner April 3, 2024 11:38
@mviswanathsai mviswanathsai marked this pull request as draft April 3, 2024 11:39
@mviswanathsai
Copy link
Contributor Author

Should I also include proxy url configs in this PR? and maybe also FollowRedirects ? @simonpasquier

@mviswanathsai mviswanathsai marked this pull request as ready for review April 5, 2024 12:06
@simonpasquier
Copy link
Contributor

no let's tackle one issue at a time.

// List of alertmanager relabel configs
//
// +optional
RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"`
RelabelConfigs []RelabelConfig `json:"relabelings,omitempty"`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we change the type after we merge #6479?

pkg/apis/monitoring/v1/prometheus_types.go Outdated Show resolved Hide resolved
pkg/prometheus/operator.go Outdated Show resolved Hide resolved
pkg/prometheus/operator.go Outdated Show resolved Hide resolved
pkg/prometheus/promcfg.go Show resolved Hide resolved
pkg/prometheus/operator.go Outdated Show resolved Hide resolved
pkg/prometheus/store.go Outdated Show resolved Hide resolved
@ArthurSens
Copy link
Member

I'm not sure if I'm missing something, but are we adding two different relabeling options under alertmanager endpoints? I was almost sure there was only one relabeling option for alertmanagers

@mviswanathsai
Copy link
Contributor Author

Yes, as of v2.51.0, we have the ability to have relabeling rules for alerts per alertmanager: alert_relabel_configs in addition to the existing relabel_configs for alertmanager discovery.

@simonpasquier simonpasquier merged commit 48e9858 into prometheus-operator:main May 14, 2024
17 checks passed
@simonpasquier
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

Feat: Extend support for relabel_configs and other missing fields in AlertmanagerEndpoints
3 participants