Documentation
¶
Overview ¶
Copyright 2025 Nutanix. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2025 Nutanix. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cause ¶
Cause represents a cause of a check failure. It contains a message and an optional field that the cause relates to. The field is used to indicate which part of the cluster configuration the cause relates to.
type Check ¶
type Check interface { Name() string Run(ctx context.Context) CheckResult }
Check represents a single preflight check that can be run against a cluster. It has a Name method that returns the name of the check, and a Run method executes the check, and returns a CheckResult. The Name method is used to identify the check if Run fails to return a result, for example if it panics.
type CheckResult ¶
CheckResult represents the result of a check. It contains the name of the check, a boolean indicating whether the check passed, an error boolean indicating whether there was an internal error running the check, and a list of causes for the failure. It also contains a list of warnings that were generated during the check.
type Checker ¶
type Checker interface { // Init returns the checks that should run for the cluster. Init(ctx context.Context, client ctrlclient.Client, cluster *clusterv1.Cluster) []Check }
Checker returns a set of checks that have been initialized with common dependencies, such as an infrastructure API client.
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
func New ¶
func New(client ctrlclient.Client, decoder admission.Decoder, checkers ...Checker) *WebhookHandler