add URL validation for Webex receiver by kartikangiras · Pull Request #8255 · prometheus-operator/prometheus-operator
Description
Adds URL validation for Webex receiver configuration fields when loaded from secrets. This ensures URLs are validated regardless of whether configurations come from CustomResources or secrets.
Relates to: #8193
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.)
Verification
Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.
- Add test case for Invalid URL test: Verifies that invalid URLs are caught and return an error
- Add test case for Valid URL test: Verifies that valid URLs like "https://webexapis.com/v1/messages" pass validation
- All tests pass successfully
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.