install

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 59 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, annotations map[string]string) ([]kclient.Object, error)

func Install

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

func IsFailed added in v0.2.0

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 added in v0.2.0

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

Types

type CheckOptions added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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

func CheckIngressCapability added in v0.2.0

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

func CheckNodesReady added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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
	ControllerReplicas                  *int
	ControllerServiceAccountAnnotations map[string]string
	Config                              apiv1.Config
	Progress                            progress.Builder
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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