Documentation
¶
Index ¶
Constants ¶
const (
ControllerNamespace = "declcd-system"
)
Variables ¶
var (
ErrHelmInstallationUnsupported = errors.New("Helm installation not supported yet")
)
var (
ErrLoadProject = errors.New("Could not load project")
)
Functions ¶
Types ¶
type InstallAction ¶ added in v0.24.0
type InstallAction struct {
// contains filtered or unexported fields
}
func NewInstallAction ¶ added in v0.24.0
func NewInstallAction( kubeClient *kube.DynamicClient, httpClient *http.Client, projectRoot string, ) InstallAction
func (InstallAction) Install ¶ added in v0.24.0
func (act InstallAction) Install(ctx context.Context, opts InstallOptions) error
type InstallOptions ¶ added in v0.24.0
type Instance ¶ added in v0.25.0
type Instance struct {
Dag *component.DependencyGraph
UpdateInstructions []version.UpdateInstruction
}
Instance represents the loaded project.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager loads a declcd project and resolves the component dependency graph.
type ReconcileResult ¶
type ReconcileResult struct {
// Reports whether the GitOpsProject was flagged as suspended.
Suspended bool
// The hash of the reconciled Git Commit.
CommitHash string
// VCS Repository cache.
LocalRepositoryPath string
}
ReconcileResult reports the outcome and metadata of a reconciliation.
type Reconciler ¶
type Reconciler struct {
Log logr.Logger
KubeConfig *rest.Config
// Manager loads a declcd project and resolves the component dependency graph.
ProjectManager Manager
// RepositoryManager clones a remote vcs repository to a local path.
RepositoryManager vcs.RepositoryManager
// ComponentBuilder compiles and decodes CUE kubernetes manifest definitions of a component to the corresponding Go struct.
ComponentBuilder component.Builder
// Managers identify distinct workflows that are modifying the object (especially useful on conflicts!),
FieldManager string
// Defines the concurrency level of Declcd operations.
WorkerPoolSize int
// InsecureSkipVerify controls whether Helm clients verify server
// certificate chains and host names.
InsecureSkipTLSverify bool
// Force http for Helm registries.
PlainHTTP bool
// Directory used to cache vcs repositories or helm charts.
CacheDir string
// Namespace the controller runs in.
Namespace string
// Cron scheduler running in the background scanning for image updates.
Scheduler gocron.Scheduler
SchedulerQuitChan chan struct{}
}
Reconciler clones, pulls and loads a GitOps Git repository containing the desired cluster state, translates cue definitions to either Kubernetes unstructurd objects or Helm Releases and applies/installs them on a Kubernetes cluster. Every run stores objects in the inventory and collects dangling objects.
func (*Reconciler) Reconcile ¶
func (reconciler *Reconciler) Reconcile( ctx context.Context, gProject gitops.GitOpsProject, ) (*ReconcileResult, error)
Reconcile clones, pulls and loads a GitOps Git repository containing the desired cluster state, translates cue definitions to either Kubernetes unstructurd objects or Helm Releases and applies/installs them on a Kubernetes cluster. It stores objects in the inventory and collects dangling objects.