cluster-api: sigs.k8s.io/cluster-api/errors Index | Files

package errors

import "sigs.k8s.io/cluster-api/errors"

Index

Package Files

clusters.go consts.go controllers.go deployer.go kubeadmcontrolplane.go machines.go pointer.go

Variables

var ErrNotImplemented = errors.New("not implemented")

func IsRequeueAfter Uses

func IsRequeueAfter(err error) bool

IsRequeueAfter returns true if the error satisfies the interface HasRequeueAfterError.

DEPRECATED: This error is deprecated and should not be used for new code. See https://github.com/kubernetes-sigs/cluster-api/issues/3370 for more information.

Users should switch their methods and functions to return a (ctrl.Result, error) pair, instead of relying on this error. Controller runtime exposes a Result.IsZero() (from 0.5.9, and 0.6.2) which can be used from callers to see if reconciliation should be stopped or continue.

type ClusterError Uses

type ClusterError struct {
    Reason  ClusterStatusError
    Message string
}

A more descriptive kind of error that represents an error condition that should be set in the Cluster.Status. The "Reason" field is meant for short, enum-style constants meant to be interpreted by clusters. The "Message" field is meant to be read by humans.

func CreateCluster Uses

func CreateCluster(format string, args ...interface{}) *ClusterError

func DeleteCluster Uses

func DeleteCluster(format string, args ...interface{}) *ClusterError

func InvalidClusterConfiguration Uses

func InvalidClusterConfiguration(format string, args ...interface{}) *ClusterError

func (*ClusterError) Error Uses

func (e *ClusterError) Error() string

type ClusterStatusError Uses

type ClusterStatusError string
const (
    // InvalidConfigurationClusterError indicates that the cluster
    // configuration is invalid.
    InvalidConfigurationClusterError ClusterStatusError = "InvalidConfiguration"

    // UnsupportedChangeClusterError indicates that the cluster
    // spec has been updated in an unsupported way. That cannot be
    // reconciled.
    UnsupportedChangeClusterError ClusterStatusError = "UnsupportedChange"

    // CreateClusterError indicates that an error was encountered
    // when trying to create the cluster.
    CreateClusterError ClusterStatusError = "CreateError"

    // UpdateClusterError indicates that an error was encountered
    // when trying to update the cluster.
    UpdateClusterError ClusterStatusError = "UpdateError"

    // DeleteClusterError indicates that an error was encountered
    // when trying to delete the cluster.
    DeleteClusterError ClusterStatusError = "DeleteError"
)

func ClusterStatusErrorPtr Uses

func ClusterStatusErrorPtr(v ClusterStatusError) *ClusterStatusError

ClusterStatusErrorPtr converts a MachineStatusError to a pointer.

type HasRequeueAfterError Uses

type HasRequeueAfterError interface {
    // GetRequeueAfter gets the duration to wait until the managed object is
    // requeued for further processing.
    GetRequeueAfter() time.Duration
}

HasRequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.

DEPRECATED: This error is deprecated and should not be used for new code. See https://github.com/kubernetes-sigs/cluster-api/issues/3370 for more information.

Users should switch their methods and functions to return a (ctrl.Result, error) pair, instead of relying on this error. Controller runtime exposes a Result.IsZero() (from 0.5.9, and 0.6.2) which can be used from callers to see if reconciliation should be stopped or continue.

type KubeadmControlPlaneError Uses

type KubeadmControlPlaneError struct {
    Reason  KubeadmControlPlaneStatusError
    Message string
}

KubeadmControlPlaneError is a more descriptive kind of error that represents an error condition that should be set in the KubeadmControlPlane.Status. The "Reason" field is meant for short, enum-style constants meant to be interpreted by control planes. The "Message" field is meant to be read by humans.

func (*KubeadmControlPlaneError) Error Uses

func (e *KubeadmControlPlaneError) Error() string

type KubeadmControlPlaneStatusError Uses

type KubeadmControlPlaneStatusError string
const (
    // InvalidConfigurationKubeadmControlPlaneError indicates that the kubeadm control plane
    // configuration is invalid.
    InvalidConfigurationKubeadmControlPlaneError KubeadmControlPlaneStatusError = "InvalidConfiguration"

    // UnsupportedChangeKubeadmControlPlaneError indicates that the kubeadm control plane
    // spec has been updated in an unsupported way that cannot be
    // reconciled.
    UnsupportedChangeKubeadmControlPlaneError KubeadmControlPlaneStatusError = "UnsupportedChange"

    // CreateKubeadmControlPlaneError indicates that an error was encountered
    // when trying to create the kubeadm control plane.
    CreateKubeadmControlPlaneError KubeadmControlPlaneStatusError = "CreateError"

    // UpdateKubeadmControlPlaneError indicates that an error was encountered
    // when trying to update the kubeadm control plane.
    UpdateKubeadmControlPlaneError KubeadmControlPlaneStatusError = "UpdateError"

    // DeleteKubeadmControlPlaneError indicates that an error was encountered
    // when trying to delete the kubeadm control plane.
    DeleteKubeadmControlPlaneError KubeadmControlPlaneStatusError = "DeleteError"
)

type MachineError Uses

type MachineError struct {
    Reason  MachineStatusError
    Message string
}

A more descriptive kind of error that represents an error condition that should be set in the Machine.Status. The "Reason" field is meant for short, enum-style constants meant to be interpreted by machines. The "Message" field is meant to be read by humans.

func CreateMachine Uses

func CreateMachine(msg string, args ...interface{}) *MachineError

func DeleteMachine Uses

func DeleteMachine(msg string, args ...interface{}) *MachineError

func InvalidMachineConfiguration Uses

func InvalidMachineConfiguration(msg string, args ...interface{}) *MachineError

func UpdateMachine Uses

func UpdateMachine(msg string, args ...interface{}) *MachineError

func (*MachineError) Error Uses

func (e *MachineError) Error() string

type MachinePoolStatusFailure Uses

type MachinePoolStatusFailure string
const (
    // Represents that the combination of configuration in the MachineTemplateSpec
    // is not supported by this cluster. This is not a transient error, but
    // indicates a state that must be fixed before progress can be made.
    //
    // Example: the ProviderSpec specifies an instance type that doesn't exist.
    InvalidConfigurationMachinePoolError MachinePoolStatusFailure = "InvalidConfiguration"
)

func MachinePoolStatusErrorPtr Uses

func MachinePoolStatusErrorPtr(v MachinePoolStatusFailure) *MachinePoolStatusFailure

MachinePoolStatusErrorPtr converts a MachinePoolStatusError to a pointer.

type MachineSetStatusError Uses

type MachineSetStatusError string
const (
    // Represents that the combination of configuration in the MachineTemplateSpec
    // is not supported by this cluster. This is not a transient error, but
    // indicates a state that must be fixed before progress can be made.
    //
    // Example: the ProviderSpec specifies an instance type that doesn't exist.
    InvalidConfigurationMachineSetError MachineSetStatusError = "InvalidConfiguration"
)

type MachineStatusError Uses

type MachineStatusError string

Constants aren't automatically generated for unversioned packages. Instead share the same constant for all versioned packages

const (
    // Represents that the combination of configuration in the MachineSpec
    // is not supported by this cluster. This is not a transient error, but
    // indicates a state that must be fixed before progress can be made.
    //
    // Example: the ProviderSpec specifies an instance type that doesn't exist,
    InvalidConfigurationMachineError MachineStatusError = "InvalidConfiguration"

    // This indicates that the MachineSpec has been updated in a way that
    // is not supported for reconciliation on this cluster. The spec may be
    // completely valid from a configuration standpoint, but the controller
    // does not support changing the real world state to match the new
    // spec.
    //
    // Example: the responsible controller is not capable of changing the
    // container runtime from docker to rkt.
    UnsupportedChangeMachineError MachineStatusError = "UnsupportedChange"

    // This generally refers to exceeding one's quota in a cloud provider,
    // or running out of physical machines in an on-premise environment.
    InsufficientResourcesMachineError MachineStatusError = "InsufficientResources"

    // There was an error while trying to create a Node to match this
    // Machine. This may indicate a transient problem that will be fixed
    // automatically with time, such as a service outage, or a terminal
    // error during creation that doesn't match a more specific
    // MachineStatusError value.
    //
    // Example: timeout trying to connect to GCE.
    CreateMachineError MachineStatusError = "CreateError"

    // There was an error while trying to update a Node that this
    // Machine represents. This may indicate a transient problem that will be
    // fixed automatically with time, such as a service outage,
    //
    // Example: error updating load balancers
    UpdateMachineError MachineStatusError = "UpdateError"

    // An error was encountered while trying to delete the Node that this
    // Machine represents. This could be a transient or terminal error, but
    // will only be observable if the provider's Machine controller has
    // added a finalizer to the object to more gracefully handle deletions.
    //
    // Example: cannot resolve EC2 IP address.
    DeleteMachineError MachineStatusError = "DeleteError"

    // This error indicates that the machine did not join the cluster
    // as a new node within the expected timeframe after instance
    // creation at the provider succeeded
    //
    // Example use case: A controller that deletes Machines which do
    // not result in a Node joining the cluster within a given timeout
    // and that are managed by a MachineSet
    JoinClusterTimeoutMachineError = "JoinClusterTimeoutError"
)

func MachineStatusErrorPtr Uses

func MachineStatusErrorPtr(v MachineStatusError) *MachineStatusError

MachineStatusErrorPtr converts a MachineStatusError to a pointer.

type RequeueAfterError Uses

type RequeueAfterError struct {
    RequeueAfter time.Duration
}

RequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.

DEPRECATED: This error is deprecated and should not be used for new code. See https://github.com/kubernetes-sigs/cluster-api/issues/3370 for more information.

Users should switch their methods and functions to return a (ctrl.Result, error) pair, instead of relying on this error. Controller runtime exposes a Result.IsZero() (from 0.5.9, and 0.6.2) which can be used from callers to see if reconciliation should be stopped or continue.

func (*RequeueAfterError) Error Uses

func (e *RequeueAfterError) Error() string

Error implements the error interface

func (*RequeueAfterError) GetRequeueAfter Uses

func (e *RequeueAfterError) GetRequeueAfter() time.Duration

GetRequeueAfter gets the duration to wait until the managed object is requeued for further processing.

Package errors imports 3 packages (graph) and is imported by 64 packages. Updated 2020-09-16. Refresh now. Tools for package owners.