Documentation
¶
Index ¶
- Variables
- func Render(path string) (string, error)
- func RenderWithWarnings(path string) (string, []string, error)
- func RenderWithWarningsAndPath(path string) (string, string, []string, error)
- type Application
- type Config
- type DockerConfig
- type Environment
- type FilesetSpec
- type NetworkSpec
- type Project
- type RestartTargets
- type Secrets
- type SopsAgeConfig
- type SopsConfig
- type SopsPgpConfig
- type TopLevelResourceSpec
Constants ¶
This section is empty.
Variables ¶
var ( // ErrMissingRequired indicates a required field or value is missing. ErrMissingRequired = errors.New("missing required field") // ErrInvalidValue indicates a field has an invalid value. ErrInvalidValue = errors.New("invalid value") )
Functions ¶
func Render ¶
Render reads the manifest file at the provided path (or discovers it like Load) and returns the YAML content with ${VAR} placeholders interpolated from the current environment. Missing variables are replaced with empty strings and a warning is emitted to stderr.
func RenderWithWarnings ¶
RenderWithWarnings reads the manifest file and returns interpolated YAML and the list of missing env var names.
Types ¶
type Application ¶
type Application struct {
Root string `yaml:"root" validate:"required"`
Files []string `yaml:"files"`
Profiles []string `yaml:"profiles"`
EnvFile []string `yaml:"env-file"`
Environment *Environment `yaml:"environment"`
Secrets *Secrets `yaml:"secrets"`
Project *Project `yaml:"project"`
EnvInline []string `yaml:"-"`
SopsSecrets []string `yaml:"-"`
}
type Config ¶
type Config struct {
Docker DockerConfig `yaml:"docker"`
Sops *SopsConfig `yaml:"sops"`
Secrets *Secrets `yaml:"secrets"`
Environment *Environment `yaml:"environment"`
Applications map[string]Application `yaml:"applications" validate:"dive"`
Networks map[string]NetworkSpec `yaml:"networks"`
Volumes map[string]TopLevelResourceSpec `yaml:"volumes"`
Filesets map[string]FilesetSpec `yaml:"filesets"`
BaseDir string `yaml:"-"`
}
Config is the root desired-state structure parsed from YAML.
type DockerConfig ¶
type Environment ¶
Environment holds environment file references
type FilesetSpec ¶
type FilesetSpec struct {
Source string `yaml:"source"`
TargetVolume string `yaml:"target_volume"`
TargetPath string `yaml:"target_path"`
RestartServices RestartTargets `yaml:"restart_services"`
ApplyMode string `yaml:"apply_mode"`
Exclude []string `yaml:"exclude"`
SourceAbs string `yaml:"-"`
}
FilesetSpec defines a local directory to sync into a docker volume at a target path.
type NetworkSpec ¶ added in v0.3.0
type NetworkSpec struct {
Driver string `yaml:"driver"`
Options map[string]string `yaml:"options"`
Internal bool `yaml:"internal"`
Attachable bool `yaml:"attachable"`
IPv6 bool `yaml:"ipv6"`
Subnet string `yaml:"subnet"`
Gateway string `yaml:"gateway"`
IPRange string `yaml:"ip_range"`
AuxAddresses map[string]string `yaml:"aux_addresses"`
}
NetworkSpec allows configuring docker network driver and options.
type RestartTargets ¶ added in v0.4.0
RestartTargets represents either an explicit list of services to restart, or the sentinel value "attached" which means: discover services that mount the fileset's target_volume.
func (*RestartTargets) UnmarshalYAML ¶ added in v0.4.0
func (r *RestartTargets) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML supports either a string (must be "attached") or a list of strings. If omitted or null, it results in no restarts.
type SopsAgeConfig ¶
type SopsConfig ¶
type SopsConfig struct {
Age *SopsAgeConfig `yaml:"age"`
// Recipients is deprecated; kept for migration error messaging
Recipients []string `yaml:"recipients"`
Pgp *SopsPgpConfig `yaml:"pgp"`
}
SopsConfig configures SOPS provider(s)
type SopsPgpConfig ¶ added in v0.5.0
type SopsPgpConfig struct {
KeyringDir string `yaml:"keyring_dir"`
UseAgent bool `yaml:"use_agent"`
PinentryMode string `yaml:"pinentry_mode"`
Recipients []string `yaml:"recipients"`
Passphrase string `yaml:"passphrase"`
}
SopsPgpConfig configures PGP (GnuPG) backend for SOPS
type TopLevelResourceSpec ¶
type TopLevelResourceSpec struct{}
TopLevelResourceSpec mirrors YAML for volumes.