mesh_install

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package mesh_install exposes functions for applying resources to a Kubernetes cluster. Its exposed functions receive a K8sClient for communicating with the cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer struct {
	gmapi.CLI // greymatter CLI
	K8sClient *client.Client

	// Container for THE mesh (on the way to an experimental 1:1 operator:mesh paradigm)
	// Contains the default after load
	Mesh *meshv1.Mesh

	// Container for all K8s and GM CUE cue.Values
	OperatorCUE *cuemodule.OperatorCUE

	// Root on disk of the operator CUE. Used for reloading the default configs on teardown
	CueRoot string

	// Operator config loadable from CUE
	Config cuemodule.Config

	// Select defaults that may be directly overridden from Go
	Defaults cuemodule.Defaults

	// Sync configuration with access to a callback for updating on git repo changes
	Sync *gitops.Sync

	// ReconciliationConfigDebouncer supports an optimization that prevents configuration from being applied
	// many times for essentially the same reconciliation update. It is applied once and then registered with
	// the debouncer. It is cleared by the reconciliation finalizer on delete, or upon a GitOps update in ApplyMesh
	ReconciliationConfigDebouncer gosync.Map

	// Flag to avoid waiting during tests, and other adjustments
	TestMode bool
	// contains filtered or unexported fields
}

Installer stores a map of version.Version and a distinct version.Sidecar for each mesh.

func New

func New(c *client.Client, operatorCUE *cuemodule.OperatorCUE, initialMesh *meshv1.Mesh, cueRoot string, gmcli gmapi.CLI, cfssl *cfsslsrv.CFSSLServer, sync *gitops.Sync) (*Installer, error)

New returns a new *Installer instance for installing greymatter components and dependencies.

func (*Installer) ApplyMesh

func (i *Installer) ApplyMesh(meshInitialInstall bool)

ApplyMesh installs and updates greymatter core components and dependencies for a single mesh.

func (*Installer) Start

func (i *Installer) Start(ctx context.Context) error

Start initializes resources and configurations after controller-manager has launched. It implements the controller-runtime Runnable interface.

Jump to

Keyboard shortcuts

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