prometheus-operator icon indicating copy to clipboard operation
prometheus-operator copied to clipboard

feat: NoProxy

Open alexandersperling opened this issue 1 year ago • 4 comments

  • Add missing option for no_proxy

Description

  • Add a new type for http_config to allow passing of no_proxy value

TBH: I'm not sure, if this is everything thats needed to make this option available.

fixes #6245

Type of change

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

Changelog entry

* Add possibility to configure the `no_proxy` option for alertmanager 

alexandersperling avatar Feb 07 '24 11:02 alexandersperling

The field needs to be propagated to the generated Alertmanager configuration.

Is this something I have to trigger via make or do I still miss some code for that here?

alexandersperling avatar Feb 12 '24 13:02 alexandersperling

@alexandersperling you need to update this method to propagate the CRD field to the generated config but you'll also need to add the noProxy field to AlertmanagerConfig CRD:

https://github.com/prometheus-operator/prometheus-operator/blob/7c9524285ca745266223a19371d008c0279d08b2/pkg/alertmanager/amcfg.go#L1491

You need also to perform version checking here and discard the field if the Alertmanager version doesn't support it:

https://github.com/prometheus-operator/prometheus-operator/blob/7c9524285ca745266223a19371d008c0279d08b2/pkg/alertmanager/amcfg.go#L1694

simonpasquier avatar Feb 13 '24 09:02 simonpasquier

@simonpasquier got some time and took a look into this again

could you check if this is fine now or if I still miss something?

alexandersperling avatar Apr 10 '24 10:04 alexandersperling

Also, I'm not an expert in contributions to Alertmanager CRDs, but do we need to add this field to the v1beta1 API?

ArthurSens avatar Apr 12 '24 13:04 ArthurSens