project

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerNamespace = "declcd-system"
	ControllerName      = "gitops-controller"
)

Variables

View Source
var (
	ErrLoadProject = errors.New("Could not load project")
)

Functions

func Init

func Init(module string, path string, version string) error

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager loads a declcd project and resolves the component dependency graph.

func NewManager

func NewManager(componentBuilder component.Builder, log logr.Logger, workerPoolSize int) Manager

func (*Manager) Load

func (manager *Manager) Load(
	projectPath string,
) (*component.DependencyGraph, error)

Load uses a given path to a project and returns the components as a directed acyclic dependency graph.

type ReconcileResult

type ReconcileResult struct {
	Suspended bool
}

type Reconciler

type Reconciler struct {
	Log               logr.Logger
	Client            client.Client
	DynamicClient     kube.Client[unstructured.Unstructured]
	ProjectManager    Manager
	RepositoryManager vcs.RepositoryManager
	ComponentBuilder  component.Builder
	ChartReconciler   helm.ChartReconciler
	InventoryManager  *inventory.Manager
	GarbageCollector  garbage.Collector
	Decrypter         secret.Decrypter
	FieldManager      string
	WorkerPoolSize    int
}

Reconciler clones, pulls and loads a GitOps Git repository containing the desired cluster state, then decrypts secrets, 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 gitopsv1.GitOpsProject,
) (*ReconcileResult, error)

Reconcile clones, pulls and loads a GitOps Git repository containing the desired cluster state, then decrypts secrets, 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.

Jump to

Keyboard shortcuts

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