Documentation
¶
Overview ¶
Package config loads and validates the Ripen policy file. Validation is fail-closed: unknown fields, ambiguous rules, and unsafe values are config-load errors, never warnings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposeSettings ¶
type ComposeSettings struct {
Docker EngineSettings
Podman EngineSettings
}
ComposeSettings holds the two compose engine configurations.
type EngineSettings ¶
EngineSettings configures one compose engine.
type GitHubPolicy ¶
GitHubPolicy configures Git-native update Proposals.
type HealthPolicy ¶
HealthPolicy is one HTTP functional health check.
type NotifierSettings ¶
type NotifierSettings struct {
Webhook *WebhookSettings
// HeartbeatIntervalSeconds, when set, makes the Notifier deliver
// even a suppressed run.finished if nothing has been delivered for
// that long, so silence stays distinguishable from failure.
HeartbeatIntervalSeconds int
}
NotifierSettings holds the one outbound Notifier and its heartbeat.
type Policy ¶
type Policy struct {
Mode domain.Mode
MaxUpdatesPerRun int
VerificationTimeoutSeconds int
CandidateMinAgeSeconds int
LeaseTTLSeconds int
CheckIntervalSeconds int
ObservationConcurrency int
StateFile string
Portainer *PortainerSettings
Compose ComposeSettings
Stacks []StackPolicy
ExcludedStacks []string
GitHub *GitHubPolicy
Notifier *NotifierSettings
UI *UISettings
}
Policy is the loaded, validated configuration.
type PortainerSettings ¶
type PortainerSettings struct {
BaseURL string
APIKeyFile string
ExpectedUsername string
TLSCAFile string
TLSFingerprintSHA256 string
}
PortainerSettings configures the Portainer backend connection.
type ServicePolicy ¶
type ServicePolicy struct {
Name string
AutoApply bool
Health HealthPolicy
Enabled bool
}
ServicePolicy is a per-service rule inside a multi-service stack.
type StackPolicy ¶
type StackPolicy struct {
Name string
Backend domain.Backend
Enabled bool
AutoApply bool
ExpectedServices []string
Health *HealthPolicy
Services []ServicePolicy
GitPath string
// File and Project apply to compose backends only. File is the
// symlink-resolved compose file path; Project defaults to Name.
File string
Project string
}
StackPolicy is the policy for one stack.
type UISettings ¶
type UISettings struct {
Enabled bool
Address string
// TokenFile holds the bearer token for a non-loopback bind. Ripen
// keeps every secret in a file, never in the policy document, and
// RIPEN_UI_TOKEN is the other way to supply it.
TokenFile string
}
UISettings configures the optional read-only Web UI. It is off unless enabled is true — there is no way to switch it on by accident.