Documentation ¶
Index ¶
- func AllResources() ([]kclient.Object, error)
- func Config(cfg apiv1.Config) ([]kclient.Object, error)
- func Deployments(runtimeImage string, apiServerReplicas, controllerReplicas int, ...) ([]kclient.Object, error)
- func Dev(ctx context.Context, imageName string, cred *apiv1.RegistryAuth, opts *Options) error
- func Install(ctx context.Context, image string, opts *Options) error
- func IsFailed(results []CheckResult) bool
- func Namespace() ([]kclient.Object, error)
- func Roles() ([]kclient.Object, error)
- func TraefikResources() (result []kclient.Object, _ error)
- type CheckOptions
- type CheckResult
- func CheckDefaultStorageClass(ctx context.Context, opts CheckOptions) CheckResult
- func CheckExec(ctx context.Context, opts CheckOptions) CheckResult
- func CheckIngressCapability(ctx context.Context, opts CheckOptions) CheckResult
- func CheckNodesReady(ctx context.Context, opts CheckOptions) CheckResult
- func CheckRBAC(ctx context.Context, opts CheckOptions) CheckResult
- func PostInstallChecks(ctx context.Context, opts CheckOptions) []CheckResult
- func PreInstallChecks(ctx context.Context, opts CheckOptions) []CheckResult
- func RunChecks(ctx context.Context, opts CheckOptions, ...) []CheckResult
- type Mode
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllResources ¶
func Deployments ¶
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 TraefikResources ¶
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.