Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Over the past year, I've observed many users requiring specific DNS configurations rather than blindly defaulting to local DNS settings:
I observe that Blackbox Exporter supports Helm chart deployment and provides container images, which enables flexible deployment in large-scale Kubernetes clusters. Real-world network probing requirements are often complex. We want certain pods to maintain the ability to resolve targets through CoreDNS, while other pods should resolve public DNS addresses or DNS servers on jump hosts. Based on these enterprise-level realities, we've made some modifications to the source code.
Assuming we want the following configuration (either manually written or Helm-generated):
/etc/blackbox.yamlmetrics/data/{cluster-name}/blackbox.jumpserver.yamlmetrics/data/{cluster-name}/blackbox.worker.yamlmetrics/data/{cluster-name}/blackbox.master.yamlWe have implemented the following configuration (sanitized and simplified for demonstration):
This PR has been running stably in Kubernetes clusters spanning hundreds to thousands of physical machines and has operated continuously for over a year. The code and operational experience have undergone rigorous production-level validation.
I hope this will be helpful to others. @electron0zero , @anionDev , @RorFis , @darioef , @snaar