Documentation
¶
Overview ¶
Runs reconciliation loop to schedule tasks periodically
Sync changes from upstream Git repository and deploy updated/new stacks
Index ¶
- Constants
- type Config
- type Reconciler
- func (r *Reconciler) CacheClear()
- func (r *Reconciler) CacheGet() []string
- func (r *Reconciler) CacheLoadSecrets() error
- func (r *Reconciler) CacheSet(envs map[string]string)
- func (r *Reconciler) Deploy(ctx context.Context, project *types.Project) error
- func (r *Reconciler) Prune(ctx context.Context, srcStack []dockercompose.ComposeConfig) error
- func (r *Reconciler) Run(ctx context.Context)
- func (r *Reconciler) Sync(ctx context.Context) error
- type StackConfig
- type StackInfo
- type StackStateMap
- type Timers
Constants ¶
const ( LabelAppVersion = "composeflux.version" LabelDeployedAt = "composeflux.deployed-at" LabelManagedBy = "compose.stack.managed-by" LabelStackHash = "compose.stack.hash" ManagedByValue = "composeflux" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg Config, sClient secrets.Client, gClient source.Client, dClient dockercompose.Client) (*Reconciler, error)
func (*Reconciler) CacheClear ¶
func (r *Reconciler) CacheClear()
CacheClear removes all variables and secrets from cache
func (*Reconciler) CacheGet ¶
func (r *Reconciler) CacheGet() []string
CacheGet retrieves all cached variables as a slice in "key=value" format
func (*Reconciler) CacheLoadSecrets ¶
func (r *Reconciler) CacheLoadSecrets() error
CacheLoadSecrets fetches all secrets from external source and stores in cache as "key=value" items
func (*Reconciler) CacheSet ¶
func (r *Reconciler) CacheSet(envs map[string]string)
CacheSet stores key-value pairs from map in cache as "key=value" items
func (*Reconciler) Deploy ¶
Deploy deploys the docker compose project with custom labels and environmental variables.
func (*Reconciler) Prune ¶
func (r *Reconciler) Prune(ctx context.Context, srcStack []dockercompose.ComposeConfig) error
Prune deletes the running stacks which are not in source repo
func (*Reconciler) Run ¶
func (r *Reconciler) Run(ctx context.Context)
type StackConfig ¶
type StackConfig struct {
StartupOrder []string `yaml:"startup_order"`
Envs map[string]string `yaml:"envs"`
}
func Load ¶
func Load(path string) (*StackConfig, error)