Skip to content

dragonflyoss/dragonfly-injector

Repository files navigation

dragonfly-injector

A Kubernetes Mutating Admission Webhook for automatic P2P capability injection in Dragonfly. This project simplifies Kubernetes Pod configuration by automating the injection of Dragonfly's P2P proxy settings, dfdaemon socket mounts, and CLI tools through annotation-based policies.

Description

Refer to the documentation for more details.

Getting Started

Deploy

kubectl apply -f https://raw.githubusercontent.com/dragonflyoss/dragonfly-injector/main/dist/install.yaml

Configure

There are two ways to configure the injector:

Method 1: Edit the configuration file directly

Before kubectl apply, edit the ConfigMap named dragonfly-injector-inject-config in dist/install.yaml.

Method 2: Use kubectl to edit the config

After kubectl apply, you can edit the ConfigMap named dragonfly-injector-inject-config in dragonfly-injector-system namespace.

kubectl -n dragonfly-injector-system edit configmap dragonfly-injector-inject-config

Default configuration (reload time: 15s):

config.yaml: |
  enable: true       # Whether to enable injection
  proxy_port: 4001   # The proxy port of Dragonfly Dfdaemon
  cli_tools_image: dragonflyoss/toolkits:latest # The image used for injection
  cli_tools_dir_path: /dragonfly-tools          # The tools directory path in the image

For more details, please refer to the docs/install.md.

About

A Dragonfly mutating webhook server that implements toolkits injection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •