Skip to content

Conversation

@aymericDD
Copy link
Contributor

@aymericDD aymericDD commented Dec 19, 2025

What does this PR do?

  • Adds new functionality
  • Alters existing functionality
  • Fixes a bug
  • Improves documentation or testing

Please briefly describe your changes as well as the motivation behind them:

Adds configuration options to specify custom resolv.conf file paths for DNS resolution in network disruptions.

  • Adds injector.networkDisruption.dnsPodResolvConf config field (default: /etc/resolv.conf)
  • Adds injector.networkDisruption.dnsNodeResolvConf config field (default: /mnt/host/etc/resolv.conf)
  • Paths configurable via Helm values, ConfigMap, or CLI flags
  • DNS client logs loaded resolv.conf paths and nameservers
  • Changes DNS path handling from list-based to single path per context

Configuration example:

  injector:
    networkDisruption:
      dnsNodeResolvConf: "/mnt/host/run/systemd/resolve/resolv.conf"

Code Quality Checklist

  • The documentation is up to date.
  • My code is sufficiently commented and passes continuous integration checks.
  • I have signed my commit (see Contributing Docs).

Testing

  • I leveraged continuous integration testing
    • by depending on existing unit tests or end-to-end tests.
    • by adding new unit tests or end-to-end tests.
  • I manually tested the following steps:
    • Verified default paths work correctly
    • Tested custom path configuration
    • Confirmed logging shows loaded paths
    • Validated CLI arguments passed to injector pods
    • locally.
    • as a canary deployment to a cluster.

Copy link
Contributor Author

aymericDD commented Dec 19, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@aymericDD aymericDD force-pushed the aymeric.daurelle/CHAOSPLT-1360/fix branch from 4234dea to 10db19f Compare December 19, 2025 10:46
@aymericDD aymericDD changed the title feat(network): add resolv.conf path customization [CHAOSPLT-1359] Add DNS resolv.conf path customization for network disruptions Dec 19, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 19, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1a19143 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@aymericDD aymericDD requested a review from a team December 22, 2025 10:21
@aymericDD aymericDD changed the title [CHAOSPLT-1359] Add DNS resolv.conf path customization for network disruptions [CHAOSPLT-1360] Add DNS resolv.conf path customization for network disruptions Dec 22, 2025
@aymericDD aymericDD removed the request for review from a team December 22, 2025 11:43
@aymericDD aymericDD force-pushed the aymeric.daurelle/CHAOSPLT-1360/fix branch from 10db19f to fcbc91d Compare December 22, 2025 13:09
@aymericDD aymericDD force-pushed the aymeric.daurelle/CHAOSPLT-1360/fix branch from fcbc91d to e363d15 Compare December 22, 2025 20:06
Adds configuration to customize resolv.conf file paths
for pod and node DNS resolution in network disruptions.

Users can now override default paths via Helm values,
ConfigMap, or CLI flags to support different Kubernetes
distributions (systemd-resolved, NetworkManager, etc.).

Configuration:
- injector.networkDisruption.dnsPodResolvConf
- injector.networkDisruption.dnsNodeResolvConf

Defaults: /etc/resolv.conf (pod),
          /mnt/host/etc/resolv.conf (node)

Logs show which resolv.conf files are loaded with their
nameservers for debugging.

Jira: CHAOSPLT-1360
@aymericDD aymericDD force-pushed the aymeric.daurelle/CHAOSPLT-1359/feature branch from 91df8fa to 7b43367 Compare December 22, 2025 20:27
@aymericDD aymericDD force-pushed the aymeric.daurelle/CHAOSPLT-1360/fix branch from e363d15 to 1a19143 Compare December 22, 2025 20:27
@aymericDD aymericDD requested a review from a team December 22, 2025 20:38
@aymericDD aymericDD marked this pull request as ready for review December 22, 2025 20:39
Comment on lines +135 to +136
# dnsPodResolvConf: "/etc/resolv.conf" # (optional) path for pod DNS resolv.conf
# dnsNodeResolvConf: "/mnt/host/etc/resolv.conf" # (optional) path for node DNS resolv.conf
Copy link
Contributor

Choose a reason for hiding this comment

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

The indentation looks a little off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants