install

package
v0.10.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllResources

func AllResources() ([]kclient.Object, error)

func Config

func Config(cfg apiv1.Config) ([]kclient.Object, error)

func Deployments

func Deployments(runtimeImage string, apiServerReplicas, controllerReplicas int, useCustomCABundle bool, controllerSAAnnotations, apiPodAnnotations map[string]string) ([]kclient.Object, error)

func Dev

func Dev(ctx context.Context, imageName string, cred *apiv1.RegistryAuth, opts *Options) error

func Install

func Install(ctx context.Context, image string, opts *Options) error

func IsFailed

func IsFailed(results []CheckResult) bool

IsFailed is a simple helper function marking a list of check results as failed if one or more results show failed status.

func Namespace

func Namespace() ([]kclient.Object, error)

func Roles

func Roles() ([]kclient.Object, error)

func TraefikResources

func TraefikResources() (result []kclient.Object, _ error)

Types

type CheckOptions

type CheckOptions struct {
	Client kclient.WithWatch

	// RuntimeImage is required for tests that spin up a pod and that we want to work in airgap environments
	RuntimeImage string `json:"runtimeImage"`

	// IngressClassName is required for tests that check for ingress capabilities
	IngressClassName *string `json:"ingressClassName"`

	// Namespace to override the namespace in which tests are executed (default: acorn-system)
	Namespace *string `json:"namespace"`
}

CheckOptions defines some extra settings for the tests

type CheckResult

type CheckResult struct {
	Message string `json:"message"`
	Passed  bool   `json:"passed"`
	Name    string `json:"name"`
}

CheckResult describes the results of a check, making it human-readable

func CheckDefaultStorageClass

func CheckDefaultStorageClass(ctx context.Context, opts CheckOptions) CheckResult

* CheckDefaultStorageClass checks if a default storage class is defined. * -> This is a non-critical check that "only" affects some features of Acorn.

func CheckExec

func CheckExec(ctx context.Context, opts CheckOptions) CheckResult

func CheckIngressCapability

func CheckIngressCapability(ctx context.Context, opts CheckOptions) CheckResult

func CheckNodesReady

func CheckNodesReady(ctx context.Context, opts CheckOptions) CheckResult

* CheckNodesReady checks if all nodes are ready. * -> This is a critical check, which "could" affect the installation. * TODO: We only need to check if the cluster is operational. * -> A single malfunctioning node should not prevent the installation.

func CheckRBAC

func CheckRBAC(ctx context.Context, opts CheckOptions) CheckResult

* CheckRBAC checks if the user has the necessary privileges allow * Acorn to run. In this case, we check if the user has the rights * to create a namespace, which is required for the installation. * -> This is a critical check that must be passed for Acorn to be installed.

func PostInstallChecks

func PostInstallChecks(ctx context.Context, opts CheckOptions) []CheckResult

PostInstallChecks is a list of all checks that are run after the installation. They are not critical and should not affect the installation process.

func PreInstallChecks

func PreInstallChecks(ctx context.Context, opts CheckOptions) []CheckResult

PreInstallChecks is a list of all checks that are run before the installation. They are critical and will make the installation fail.

func RunChecks

func RunChecks(ctx context.Context, opts CheckOptions, checks ...func(ctx context.Context, opts CheckOptions) CheckResult) []CheckResult

RunChecks runs a list of checks and returns their results as a list.

type Mode

type Mode string

type Options

type Options struct {
	SkipChecks                          bool
	OutputFormat                        string
	APIServerReplicas                   *int
	APIServerPodAnnotations             map[string]string
	ControllerReplicas                  *int
	ControllerServiceAccountAnnotations map[string]string
	Config                              apiv1.Config
	Progress                            progress.Builder
	Quiet                               bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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