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 Secrets
- type SopsAgeConfig
- type SopsConfig
- 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 []string `yaml:"restart_services"`
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 SopsAgeConfig ¶
type SopsAgeConfig struct {
KeyFile string `yaml:"key_file"`
}
type SopsConfig ¶
type SopsConfig struct {
Age *SopsAgeConfig `yaml:"age"`
Recipients []string `yaml:"recipients"`
}
SopsConfig configures SOPS provider(s)
type TopLevelResourceSpec ¶
type TopLevelResourceSpec struct{}
TopLevelResourceSpec mirrors YAML for volumes.