Skip to content

Conversation

@diyarab
Copy link
Contributor

@diyarab diyarab commented Dec 17, 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 an opt-in injector.mountSystemdResolve configuration value. When enabled, the chaos injector mounts the host’s /run/systemd/resolve/resolv.conf over /mnt/host/etc/resolv.conf, ensuring the node DNS config can be read even when /mnt/host/etc/resolv.conf points elsewhere. Defaults remain unchanged, so clusters without systemd-resolved continue working as before.

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:
    • locally.
    • as a canary deployment to a cluster.

@diyarab diyarab force-pushed the diyara.bissembayeva/fix/node-dns-resolver branch from 03704ef to 08e0f20 Compare December 17, 2025 21:51
@datadog-datadog-prod-us1
Copy link

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

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@diyarab diyarab changed the title wip: try both node dns configs wip: node dnf cnfg Dec 17, 2025
@diyarab diyarab changed the title wip: node dnf cnfg Add optional systemd resolver mount for chaos injectors Dec 18, 2025
@diyarab diyarab marked this pull request as ready for review December 18, 2025 06:48
}

if m.config.Injector.MountSystemdResolve {
podSpec.Containers[0].VolumeMounts = append(podSpec.Containers[0].VolumeMounts, corev1.VolumeMount{
Copy link
Contributor

Choose a reason for hiding this comment

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

could we add a quick verification that we have at least 1 container in the list?

It should never happen but just in case!

repo: chaos-injector
annotations: {} # extra annotations passed to the chaos injector pods
labels: {} # extra labels passed to the chaos injector pods
mountSystemdResolve: false # bind-mount /run/systemd/resolve/resolv.conf into injector pods
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add documentation in the docs/ folder to describe this new field?

@diyarab
Copy link
Contributor Author

diyarab commented Dec 19, 2025

Superseded by PR #1010

@diyarab diyarab closed this Dec 19, 2025
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