reconcile

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Runs reconciliation loop to schedule tasks periodically

Sync changes from upstream Git repository and deploy updated/new stacks

Index

Constants

View Source
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 Config

type Config struct {
	StackPath  string `` /* 131-byte string literal not displayed */
	ConfigFile string `name:"config-file" help:"Stack configuration file name" env:"CONFIG_FILE" default:"stack.yml" group:"Reconciler Options:"`

	Timers Timers `embed:"" group:"Reconciler Options:"`
}

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

func (r *Reconciler) Deploy(ctx context.Context, project *types.Project) error

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)

func (*Reconciler) Sync

func (r *Reconciler) Sync(ctx context.Context) error

Sync pulls changes from Git repo and deploys stacks which are changed and new

type StackConfig

type StackConfig struct {
	StartupOrder []string          `yaml:"startup_order"`
	Envs         map[string]string `yaml:"envs"`
}

func Load

func Load(path string) (*StackConfig, error)

type StackInfo

type StackInfo struct {
	Hash string
}

type StackStateMap

type StackStateMap map[string]StackInfo

type Timers

type Timers struct {
	GitInterval time.Duration `name:"git-interval" help:"Git repository polling interval" env:"GIT_INTERVAL" default:"5m" group:"Reconciler Options:"`
}

Jump to

Keyboard shortcuts

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