Documentation ¶
Index ¶
Constants ¶
const (
ControllerNamespace = "navecd-system"
)
Variables ¶
var (
ErrHelmInstallationUnsupported = errors.New("Helm installation not supported yet")
)
var (
ErrLoadProject = errors.New("Could not load project")
)
Functions ¶
Types ¶
type InstallAction ¶
type InstallAction struct {
// contains filtered or unexported fields
}
func NewInstallAction ¶
func NewInstallAction( kubeClient *kube.DynamicClient, httpClient *http.Client, projectRoot string, ) InstallAction
func (InstallAction) Install ¶
func (act InstallAction) Install(ctx context.Context, opts InstallOptions) error
type InstallOptions ¶
type Instance ¶
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 navecd 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 // PullError reports any error occured while trying to pull from vcs. // It is a soft error, which does not halt the reconciliation process, but has to be reported. PullError error // ComponentError reports the first occured component reconciliation error. // It is a soft error, which does not halt the reconciliation process, but has to be reported. ComponentError error }
ReconcileResult reports the outcome and metadata of a reconciliation.
type Reconciler ¶
type Reconciler struct { Log logr.Logger KubeConfig *rest.Config // Manager loads a navecd 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 Navecd 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{} SchedulerUpdateChan chan version.AvailableUpdate SchedulerErrGroup *errgroup.Group }
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.