Skip to content

webhook: add idempotency check and configurable unix socket path#31

Open
pmady wants to merge 1 commit into
dragonflyoss:mainfrom
pmady:refactor/idempotency-configurable-socket-metrics
Open

webhook: add idempotency check and configurable unix socket path#31
pmady wants to merge 1 commit into
dragonflyoss:mainfrom
pmady:refactor/idempotency-configurable-socket-metrics

Conversation

@pmady
Copy link
Copy Markdown

@pmady pmady commented Mar 25, 2026

What this PR does

Part of dragonflyoss/dragonfly#4416. Adds idempotency check (dragonfly.io/injected annotation) to prevent double injection, makes unix socket path configurable via InjectConf, and adds tests.

Ref: dragonflyoss/dragonfly#4416

- Add dragonfly.io/injected annotation to prevent double injection
- Make unix socket path configurable via Config.UnixSockPath field
- Fall back to default /var/run/dragonfly/dfdaemon.sock when empty
- Add tests for configurable socket path and idempotency
- Update default ConfigMap with unixSockPath field

Ref: dragonflyoss/dragonfly#4416
Signed-off-by: pmady <pavan4devops@gmail.com>
@pmady pmady force-pushed the refactor/idempotency-configurable-socket-metrics branch from a64cf25 to 25dd45f Compare March 26, 2026 17:46
@pmady
Copy link
Copy Markdown
Author

pmady commented Apr 6, 2026

Hi friendly ping on this PR. It's been open for about 2 weeks now.

Quick summary of what it does (ref: dragonflyoss/dragonfly#4416):

  • Idempotency: Adds dragonfly.io/injected annotation to prevent double injection on re-admitted pods
  • Configurable unix socket path: Makes the dfdaemon socket path configurable via Config.UnixSockPath (falls back to default /var/run/dragonfly/dfdaemon.sock)
  • Tests: Adds tests for both features (custom/default socket path, skip-already-injected, annotation-set-after-inject, no-double-inject)

The branch is cleanly rebased on the latest main (c77b133). All 48 injector unit tests pass. The changes are minimal (+159/-2 lines across 8 files).

Is there anything you'd like me to change or split up before merging? Happy to address any feedback.

@pmady
Copy link
Copy Markdown
Author

pmady commented May 4, 2026

@gaius-qi bump on this one too when you get a chance - adds the idempotency check we discussed plus makes the unix socket path configurable

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.

1 participant