pluginpolicy

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	ExecParameterPathBaseSource     = "source"
	ExecParameterPathBaseRepository = "repository"
)

Variables

This section is empty.

Functions

func Fingerprint

func Fingerprint(policy Policy) (string, error)

Types

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 BootstrapParameterMap struct {
	Values map[string]string
}

type ConfigManagementPluginGenerate added in v0.1.14

type ConfigManagementPluginGenerate struct {
	Command []string
	Args    []string
}

type ConfigManagementPluginSeed added in v0.1.14

type ConfigManagementPluginSeed struct {
	Discover *PluginDiscoverMatch
	Generate *ConfigManagementPluginGenerate
}

type ContainerCacheMount added in v0.1.14

type ContainerCacheMount struct {
	Name   string
	Target string
}

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 Engine

type Engine string
const (
	EngineAVPCompat       Engine = "avp-compat"
	EngineNativeKustomize Engine = "native-kustomize"
	EngineExec            Engine = "exec"
	EngineContainer       Engine = "container"
)

type ExecCommand

type ExecCommand struct {
	Command []string
	Timeout time.Duration
}

type ExecConfig

type ExecConfig struct {
	Workdir       string
	Copy          ExecCopy
	Init          *ExecCommand
	Generate      ExecCommand
	PostRenderers []ExecCommand
	Env           ExecEnv
	Parameters    ExecParameters
	Output        ExecOutput
}

type ExecCopy added in v0.1.14

type ExecCopy struct {
	Scope   string
	Include []string
}

type ExecEnv

type ExecEnv struct {
	Allow []string
}

type ExecOutput

type ExecOutput struct {
	MaxStdoutBytes int64
	MaxStderrBytes int64
}

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 ExecParameterPath struct {
	Base  string
	Allow []string
}

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 PluginDiscoverMatch struct {
	FileName string
	FindGlob string
}

type PluginMatch added in v0.1.14

type PluginMatch struct {
	Discover PluginDiscoverMatch
}

type Policy

type Policy struct {
	Bootstrap Bootstrap
	Plugins   map[string]Plugin
}

func Parse

func Parse(path string, data []byte) (Policy, error)

func (Policy) Plugin

func (p Policy) Plugin(name string) (Plugin, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL