Documentation
¶
Index ¶
- Constants
- func Fingerprint(policy Policy) (string, error)
- func IsManagedEnvName(name string) bool
- func IsValidEnvName(name string) bool
- func ValidateEnvName(name string) error
- type ApplicationEnv
- type Bootstrap
- type BootstrapEntrypoint
- type BootstrapParameter
- type BootstrapParameterArray
- type BootstrapParameterMap
- type ConfigManagementPluginGenerate
- type ConfigManagementPluginSeed
- type ContainerCacheMount
- type ContainerConfig
- type ContainerNetwork
- type ContainerRuntime
- type Engine
- type ExecCommand
- type ExecConfig
- type ExecCopy
- type ExecEnv
- type ExecOutput
- type ExecParameter
- type ExecParameterPath
- type ExecParameterType
- type ExecParameters
- type Plugin
- type PluginDiscoverMatch
- type PluginMatch
- type Policy
Constants ¶
const ( NoPolicyFingerprint = "" ExecWorkdirSource = "source" ExecCopyScopeSource = "source" ExecCopyScopeRepository = "repository" DefaultInitTimeout = 10 * time.Second DefaultGenerateTimeout = 60 * time.Second DefaultPostRendererTimeout = 30 * time.Second DefaultMaxStdoutBytes = int64(10 * 1024 * 1024) DefaultMaxStderrBytes = int64(64 * 1024) DefaultContainerRuntime = ContainerRuntimeDocker DefaultContainerNetwork = ContainerNetworkNone ContainerCacheTargetRoot = "/drydock-cache" )
const ( ExecParameterPathBaseSource = "source" ExecParameterPathBaseRepository = "repository" )
const ApplicationEnvPrefix = "ARGOCD_ENV_"
ApplicationEnvPrefix prefixes every Application env name on delivery: an applicationEnv.allow entry NAME reaches the plugin as ARGOCD_ENV_NAME, the way an Argo CD repo-server delivers spec.source.plugin.env. IsManagedEnvName, managedEnvNameWarning, and the delivery code must agree on this prefix.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
func IsManagedEnvName ¶ added in v0.3.0
IsManagedEnvName reports whether drydock sets name itself for command-backed plugins (case-insensitive, like the reserved-name check).
func IsValidEnvName ¶ added in v0.3.0
IsValidEnvName reports whether name is a POSIX environment identifier.
func ValidateEnvName ¶ added in v0.3.0
ValidateEnvName returns an error if name may not appear in policy env.allow: it must be an identifier and must not be a reserved loader/interpreter variable or a name the Application parameter environment owns (PATH, ARGOCD_APP_PARAMETERS, PARAM_*, LD_*, DYLD_*, ...).
Types ¶
type ApplicationEnv ¶ added in v0.3.0
type ApplicationEnv struct {
Allow []string
}
ApplicationEnv allowlists Application-authored spec.source.plugin.env NAMES for command-backed engines. Allowed entries reach the plugin as ARGOCD_ENV_<name> after substitution against the Argo CD build environment, exactly as a repo-server delivers them; the prefix keeps them apart from env.allow (drydock's own process environment) and from every reserved name.
type Bootstrap ¶ added in v0.1.14
type Bootstrap struct {
Entrypoints []BootstrapEntrypoint
}
type BootstrapEntrypoint ¶ added in v0.1.14
type BootstrapEntrypoint struct {
Name string
Plugin string
SourcePath string
Parameters []BootstrapParameter
}
type BootstrapParameter ¶ added in v0.1.14
type BootstrapParameter struct {
Name string
String *string
Array *BootstrapParameterArray
Map *BootstrapParameterMap
}
type BootstrapParameterArray ¶ added in v0.1.14
type BootstrapParameterArray struct {
Values []string
}
type BootstrapParameterMap ¶ added in v0.1.14
type ConfigManagementPluginGenerate ¶ added in v0.1.14
type ConfigManagementPluginSeed ¶ added in v0.1.14
type ConfigManagementPluginSeed struct {
Discover *PluginDiscoverMatch
Generate *ConfigManagementPluginGenerate
}
type ContainerCacheMount ¶ added in v0.1.14
type ContainerConfig ¶ added in v0.1.14
type ContainerConfig struct {
Runtime ContainerRuntime
Image string
AllowMutableImageTag bool
Network ContainerNetwork
CacheMounts []ContainerCacheMount
Lifecycle ExecConfig
}
type ContainerNetwork ¶ added in v0.1.14
type ContainerNetwork string
const ( ContainerNetworkNone ContainerNetwork = "none" ContainerNetworkDefault ContainerNetwork = "default" )
type ContainerRuntime ¶ added in v0.1.14
type ContainerRuntime string
const (
ContainerRuntimeDocker ContainerRuntime = "docker"
)
type ExecCommand ¶
type ExecConfig ¶
type ExecConfig struct {
Workdir string
Copy ExecCopy
Init *ExecCommand
Generate ExecCommand
PostRenderers []ExecCommand
Env ExecEnv
ApplicationEnv ApplicationEnv
Parameters ExecParameters
Output ExecOutput
}
type ExecOutput ¶
type ExecParameter ¶ added in v0.1.14
type ExecParameter struct {
Name string
Type ExecParameterType
Required bool
Path *ExecParameterPath
}
type ExecParameterPath ¶ added in v0.1.14
type ExecParameterType ¶ added in v0.1.14
type ExecParameterType string
const ( ExecParameterTypeString ExecParameterType = "string" ExecParameterTypeArray ExecParameterType = "array" ExecParameterTypeMap ExecParameterType = "map" )
type ExecParameters ¶ added in v0.1.14
type ExecParameters struct {
Allow []ExecParameter
}
type Plugin ¶
type Plugin struct {
Engine Engine
Match *PluginMatch
ConfigManagementPlugin *ConfigManagementPluginSeed
Exec *ExecConfig
Container *ContainerConfig
}
type PluginDiscoverMatch ¶ added in v0.1.14
type PluginMatch ¶ added in v0.1.14
type PluginMatch struct {
Discover PluginDiscoverMatch
}