cluster

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

FluxCRDs are CRDs which install is checking if they are present in the cluster or not.

Functions

This section is empty.

Types

type Applier

type Applier struct {
	Runner runner.Runner
	Waiter Waiter
}

Applier applies the previously generated manifest files.

func (*Applier) Apply

func (a *Applier) Apply(folder string, kubeContext string, kubeConfig string, dryRun bool) error

Apply applies the fetched manifest files to a cluster.

type Fetcher

type Fetcher struct {
	Client *http.Client
}

Fetcher will download a manifest tar file from a remote repository.

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, url, version, dir string) error

Fetch the latest or a version of the released manifest files for profiles.

type InstallConfig added in v0.6.0

type InstallConfig struct {
	// BaseURL is given even one would like to download manifests from a fork
	// or a test repo.
	BaseURL               string
	Location              string
	Version               string
	KubeContext           string
	KubeConfig            string
	FluxNamespace         string
	IgnorePreflightErrors bool
	DryRun                bool
	Keep                  bool
	K8sClient             client.Client
}

InstallConfig defines configuration options for install.

type Installer added in v0.6.0

type Installer struct {
	InstallConfig
	Applier *Applier
	Fetcher *Fetcher
	Runner  runner.Runner
}

Installer will install an environment.

func NewInstaller added in v0.6.0

func NewInstaller(cfg InstallConfig) (*Installer, error)

NewInstaller creates an installer with set dependencies ready to be used.

func (*Installer) Install added in v0.6.0

func (i *Installer) Install() error

Install will install an environment with everything that is needed to run profiles.

func (*Installer) PreFlightCheck added in v0.6.0

func (i *Installer) PreFlightCheck() error

PreFlightCheck checks whether install can run or not.

type KubeConfig

type KubeConfig struct {
	Client    client.Client
	Interval  time.Duration
	Timeout   time.Duration
	Namespace string
}

KubeConfig defines configurable properties of the kube waiter.

type KubeWaiter

type KubeWaiter struct {
	KubeConfig
	StatusPoller poller.Poller
}

KubeWaiter is a kubernetes waiter.

func NewKubeWaiter

func NewKubeWaiter(cfg KubeConfig) *KubeWaiter

NewKubeWaiter creates a new KubeWaiter.

func (*KubeWaiter) Wait

func (w *KubeWaiter) Wait(components ...string) error

Wait waits for some components to be status Ready.

type Waiter

type Waiter interface {
	Wait(components ...string) error
}

Waiter waits for a set of resources to be Ready.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳