Documentation
¶
Index ¶
Constants ¶
const ( ControlledPath = "/usr/local/bin:/usr/bin:/bin" MaxEnvValueBytes = 16 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func BuildEnv ¶ added in v0.1.14
func BuildEnv(policy pluginpolicy.ExecEnv, lookup func(string) (string, bool), extraEnv []string) ([]string, error)
BuildEnv composes the environment for a command-backed plugin run in this order: drydock's controlled PATH, caller-environment values for the names in policy env.allow, then extraEnv, which the caller has already ordered (Argo CD build environment, ARGOCD_APP_PARAMETERS and PARAM_*, drydock extras). Every name must be an identifier and unique across the whole environment; policy parsing already drops the names drydock manages, so a duplicate here is a composition bug and fails loudly rather than relying on os/exec or docker --env-file precedence. Names are compared exact-case (Windows, where the OS folds case, is unsupported). Values must not contain NUL and are capped at MaxEnvValueBytes.
Types ¶
type DefaultRunner ¶
type DefaultRunner struct{}