Skip to content

feat: add hostPort support and optional wait-for-scheduler#493

Open
bumarcell wants to merge 2 commits into
dragonflyoss:mainfrom
bumarcell:feat/hostport-and-wait-toggle
Open

feat: add hostPort support and optional wait-for-scheduler#493
bumarcell wants to merge 2 commits into
dragonflyoss:mainfrom
bumarcell:feat/hostport-and-wait-toggle

Conversation

@bumarcell
Copy link
Copy Markdown

Summary

In Cilium VXLAN tunnel mode, hostNetwork pods cannot reach pod IPs on remote nodes. The client DaemonSet uses hostNetwork: true by default, but discovers scheduler pod IPs from the manager and connects directly. Only local-node schedulers are reachable, breaking P2P distribution.

Changes

templates/client/client-daemonset.yaml

  • Adds conditional hostPort to upload (4000), proxy (4001), storage TCP (4005), and storage QUIC (4006) ports when hostNetwork is false
  • Makes wait-for-scheduler init container conditional on client.waitForScheduler (default true)

values.yaml

  • Adds client.waitForScheduler: true

How to use

Set client.hostNetwork: false in values. The client gets a pod IP so VXLAN encapsulation works for cross-node communication. Containerd still reaches dfdaemon at 127.0.0.1:4001 via the hostPort DNAT rule.

This is the same approach used by spegel for P2P image caching in Cilium environments.

@bumarcell
Copy link
Copy Markdown
Author

This is also already deployed and running. Please let me know if you find any problem!

@yxxhero yxxhero added the enhancement New feature or request label Apr 16, 2026
@yxxhero yxxhero requested a review from Copilot April 16, 2026 06:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Dragonfly Helm chart to better support Cilium VXLAN tunnel mode by allowing the client DaemonSet to run without hostNetwork (using hostPort mappings for key ports) and by making the scheduler wait init container optional.

Changes:

  • Add conditional hostPort mappings for client upload/proxy/storage ports when client.hostNetwork: false.
  • Gate the wait-for-scheduler initContainer behind a new client.waitForScheduler value (default true).
  • Bump chart version and update generated documentation accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
charts/dragonfly/values.yaml Introduces client.waitForScheduler with documentation comments.
charts/dragonfly/templates/client/client-daemonset.yaml Adds conditional hostPort entries and makes wait-for-scheduler conditional.
charts/dragonfly/README.md Documents the new client.waitForScheduler value in the values table.
charts/dragonfly/Chart.yaml Bumps chart version and updates Artifact Hub change notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/dragonfly/templates/client/client-daemonset.yaml
Comment thread charts/dragonfly/templates/client/client-daemonset.yaml
In Cilium VXLAN tunnel mode, hostNetwork pods cannot reach pod IPs on
remote nodes. The client DaemonSet uses hostNetwork by default but
discovers scheduler pod IPs from the manager and connects directly.
With hostNetwork, only local-node schedulers are reachable.

This adds:
- Conditional hostPort on client ports (upload, proxy, storage) when
  hostNetwork is false, allowing the client to use pod networking
  while containerd still reaches dfdaemon at 127.0.0.1:4001 via
  Cilium's hostPort DNAT
- client.waitForScheduler toggle (default true) to make the
  wait-for-scheduler init container optional

This is the same approach used by spegel for P2P image caching.

Signed-off-by: Jamal Allogie <jamal.allogie@gmail.com>
Signed-off-by: Jamal Allogie <jamal.allogie@deepl.com>
When client.hostNetwork is false, the proxy hostPort previously bound
to 0.0.0.0, exposing the HTTP proxy on every node interface. Bind it
to 127.0.0.1 by default so the proxy is only reachable from on-node
runtimes (e.g. containerd), matching how dfinit configures clients to
reach the proxy. Expose client.proxy.server.ip for operators who need
to bind a different address (e.g. 0.0.0.0 for cross-node access).

Signed-off-by: Jamal Allogie <jamal.allogie@deepl.com>
@bumarcell bumarcell force-pushed the feat/hostport-and-wait-toggle branch from a682fa8 to 6001777 Compare April 27, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants