Skip to main content
Config Management Plugins (CMPs) allow you to use custom config management tools beyond Argo CD’s native support for Helm, Kustomize, and Jsonnet.
Plugins are granted a level of trust in the Argo CD system. Only install plugins from trusted sources and audit them for security risks.

When to Use Plugins

Use a Config Management Plugin when:
  • You need a config management tool not natively supported by Argo CD
  • Argo CD’s native tool support lacks a feature you need
  • You want to customize manifest generation beyond standard tools

Plugin Architecture

Plugins run as sidecars to the argocd-repo-server component. When configured, the repo server delegates manifest generation to the plugin.

Installing a Plugin

1. Write the Plugin Configuration

Create a ConfigManagementPlugin manifest:
string
required
Unique name for the plugin within the Argo CD instance
string
Plugin version. If specified, use <name>-<version> in Application spec
object
Optional command to initialize the source directory before generation
object
required
Command to generate Kubernetes manifests. Must output valid YAML or JSON to stdout.
object
Discovery rules to automatically match Applications to this plugin

2. Place Configuration in Sidecar

The plugin config must be at /home/argocd/cmp-server/config/plugin.yaml. Option A: ConfigMap
Option B: Custom Image

3. Register Plugin Sidecar

Add sidecar to argocd-repo-server:
Critical Requirements:
  • Use /var/run/argocd/argocd-cmp-server as entrypoint
  • Run as user 999
  • Plugin config at /home/argocd/cmp-server/config/plugin.yaml
  • Separate tmp volume from repo-server (security)

Discovery Configuration

Plugins can automatically match Applications using discovery rules:

File Name Pattern

Glob Pattern (with nested directories)

Command-Based Discovery

Only one discovery method should be specified. Evaluated in order: fileName, find.glob, find.command.

Using a Plugin with an Application

Auto-Discovery

Let the plugin match based on discovery rules:

Explicit Plugin Name

Specify the plugin explicitly:

Environment Variables

Plugin commands have access to:

1. Standard Build Environment

  • ARGOCD_APP_NAME
  • ARGOCD_APP_NAMESPACE
  • ARGOCD_APP_REVISION
  • ARGOCD_APP_SOURCE_REPO_URL
  • ARGOCD_APP_SOURCE_PATH
  • ARGOCD_APP_SOURCE_TARGET_REVISION
  • KUBE_VERSION
  • KUBE_API_VERSIONS

2. Custom Environment Variables

User-supplied env vars are prefixed with ARGOCD_ENV_ to prevent setting sensitive variables.

3. Parameters

Parameters are available as:
  • JSON in ARGOCD_APP_PARAMETERS
  • Individual env vars: PARAM_VALUES_FILES_0=values-dev.yaml

Parameter Announcements

Inform the UI about available parameters:

Advanced Configuration

Preserve File Mode

Only enable if you trust the plugin. Allows executable permissions which may be a security risk.

Provide Git Credentials

Only enable for trusted plugins. Shares repository credentials with the plugin.

Timeouts

Configure timeouts to prevent long-running commands:
If repo server timeout > 90s, also increase ARGOCD_EXEC_TIMEOUT on the sidecar.

Debugging Plugins

1

Check sidecar is running

Verify two containers are running.
2

Enable debug logging

Set --loglevel=debug flag on sidecar and write to stderr.
3

Hard refresh the Application

CMP errors are cached in Redis. Always hard refresh when developing.
4

Restart repo-server after config changes

ConfigMap changes require pod restart to take effect.

Plugin Performance

Exclude unnecessary files from being sent to the plugin:
Use Go’s filepath.Match syntax. Exclude .git/* to significantly speed up manifest generation.

Example Plugins

Check out official example plugins for:
  • Custom templating tools
  • External secret management
  • Custom Helm wrappers
  • Integration with other GitOps tools

Security Best Practices

Audit Plugin Code

Review all plugin code before installation. Plugins have significant system access.

Minimal Images

Use minimal base images with only required tools to reduce attack surface.

Input Sanitization

Always sanitize and escape user input in plugin commands.

Separate Volumes

Use separate tmp volumes for each plugin to prevent path traversal attacks.