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