cilium/cilium · error

--dest is required

Error message

--dest is required

What it means

Startup validation in newBuildConfig for the cilium-dbg build-config cell: the mandatory --dest flag (buildConfigCfg.Dest) is empty, so the command refuses to start. The command's whole purpose is writing resolved configurations to a destination directory, so a destination is required.

Source

Thrown at cilium-dbg/cmd/build-config.go:98

	Source: []string{
		resolver.KindConfigMap + ":cilium-config",
		resolver.KindNodeConfig + ":" + os.Getenv("CILIUM_K8S_NAMESPACE"),
	},
	AllowConfigKeys: []string{},
	DenyConfigKeys:  []string{},
}

type buildConfig struct {
	cfg        buildConfigCfg
	log        *slog.Logger
	client     k8sClient.Clientset
	shutdowner hive.Shutdowner
}

func newBuildConfig(lc cell.Lifecycle, cfg buildConfigCfg, log *slog.Logger, client k8sClient.Clientset, shutdowner hive.Shutdowner) (*buildConfig, error) {
	if cfg.Dest == "" {
		return nil, fmt.Errorf("--dest is required")
	}

	obj := &buildConfig{
		cfg:        cfg,
		log:        log,
		client:     client,
		shutdowner: shutdowner,
	}

	lc.Append(cell.Hook{OnStart: obj.onStart})

	return obj, nil
}

func (bc *buildConfig) onStart(ctx cell.HookContext) error {
	sources := []resolver.ConfigSource{}
	for _, sourceSpec := range bc.cfg.Source {
		if sourceSpec == "" {

View on GitHub (pinned to ac7b90affa)

Solutions

  1. Add the required flag: `cilium-dbg build-config --dest /tmp/cilium/config ...`.
  2. Ensure the variable feeding --dest is non-empty at launch time; fail fast in your wrapper if it is unset.
  3. Check flag spelling/casing so the value actually binds to cfg.Dest.

Example fix

// before
// exec cilium-dbg build-config --node-name "$NODE_NAME"

// after
// exec cilium-dbg build-config --node-name "$NODE_NAME" --dest /var/lib/cilium/config
Defensive patterns

Strategy: validation

Validate before calling

if [ -z "$DEST_DIR" ]; then
  echo "--dest is required" >&2; exit 2
fi
exec cilium-dbg build-config --dest "$DEST_DIR" "$@"

Prevention

When it happens

Trigger: Launching `cilium-dbg build-config` (or embedding the hive cell) without setting --dest, or with --dest set to an empty string (e.g. an unset environment variable interpolated into the flag).

Common situations: Missing flag in a Kubernetes manifest or systemd unit; DEST='' from an empty env var; typos in the flag name so it is silently ignored.

Related errors


AI-assisted analysis of cilium/cilium@ac7b90affa (2026-08-31). Data as JSON: /api/errors/c7aad2d6dc50d84a. Report an issue: GitHub.