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 dns_sd_configs to ScrapeConfig #5866

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

slashpai
Copy link
Contributor

@slashpai slashpai commented Aug 30, 2023

Fixes #5862

Test manually and it works. Added e2e test as well

Example:

apiVersion: monitoring.coreos.com/v1alpha1
kind: ScrapeConfig
metadata:
  name: scrape-config-dns-sd-example
  namespace: default
  labels:
    app.kubernetes.io/name: scrape-config-dns-sd-example
spec:
  dnsSDConfigs:
    - names:
      - demo.do.prometheus.io
      type: A
      port: 9090
    - names:
      - node.demo.do.prometheus.io
      type: A
      port: 9100

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.

Add DNSSDConfigs to ScrapeConfig

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.

Add dns_sd_configs to ScrapeConfig CRD

@slashpai slashpai force-pushed the dns_sd branch 3 times, most recently from 4cf4942 to 337c150 Compare August 31, 2023 11:23
@slashpai slashpai changed the title pkg/apis: Add dns_sd_configs to ScrapeConfig feat: Add dns_sd_configs to ScrapeConfig Aug 31, 2023
@slashpai slashpai marked this pull request as ready for review August 31, 2023 11:24
@slashpai slashpai requested a review from a team as a code owner August 31, 2023 11:24
@slashpai slashpai marked this pull request as draft August 31, 2023 11:46
@slashpai
Copy link
Contributor Author

Moving to draft since need to test rejected resources as well

@slashpai slashpai marked this pull request as ready for review August 31, 2023 12:47
@slashpai
Copy link
Contributor Author

Moving to draft since need to test rejected resources as well

This is done. Added test for resource selection as well

@slashpai
Copy link
Contributor Author

cc: @simonpasquier

pkg/prometheus/resource_selector.go Outdated Show resolved Hide resolved
pkg/prometheus/resource_selector.go Outdated Show resolved Hide resolved
Fixes prometheus-operator#5862

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
@slashpai
Copy link
Contributor Author

slashpai commented Sep 1, 2023

@simonpasquier Addressed comments

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.

Thanks!

@simonpasquier simonpasquier merged commit 304e364 into prometheus-operator:main Sep 1, 2023
17 checks passed
@slashpai slashpai deleted the dns_sd branch September 9, 2023 04:58
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.

Support DNS SD with ScrapeConfig CRD
4 participants