Documentation ¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type APIEndpoint
- type Cluster
- type ClusterList
- type ClusterNetwork
- type ClusterPhase
- type ClusterSpec
- type ClusterStatus
- type ClusterStatusError
- type Condition
- type ConditionSeverity
- type ConditionType
- type Conditions
- type FailureDomainSpec
- type FailureDomains
- type NetworkRanges
Constants ¶
const ( // ClusterPhasePending is the first state a Cluster is assigned by // Cluster API Cluster controller after being created. ClusterPhasePending = ClusterPhase("Pending") // ClusterPhaseProvisioning is the state when the Cluster has a provider infrastructure // object associated and can start provisioning. ClusterPhaseProvisioning = ClusterPhase("Provisioning") // ClusterPhaseProvisioned is the state when its // infrastructure has been created and configured. ClusterPhaseProvisioned = ClusterPhase("Provisioned") // ClusterPhaseDeleting is the Cluster state when a delete // request has been sent to the API Server, // but its infrastructure has not yet been fully deleted. ClusterPhaseDeleting = ClusterPhase("Deleting") // ClusterPhaseFailed is the Cluster state when the system // might require user intervention. ClusterPhaseFailed = ClusterPhase("Failed") // ClusterPhaseUnknown is returned if the Cluster state cannot be determined. ClusterPhaseUnknown = ClusterPhase("Unknown") )
const (
ClusterFinalizer = "cluster.cluster.x-k8s.io"
)
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "cluster.x-k8s.io", Version: "v1alpha4"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type APIEndpoint ¶
type APIEndpoint struct { // The hostname on which the API server is serving. Host string `json:"host"` // The port on which the API server is serving. Port int32 `json:"port"` }
APIEndpoint represents a reachable Kubernetes API endpoint.
func (*APIEndpoint) DeepCopy ¶
func (in *APIEndpoint) DeepCopy() *APIEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint.
func (*APIEndpoint) DeepCopyInto ¶
func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (APIEndpoint) IsValid ¶
func (v APIEndpoint) IsValid() bool
IsValid returns true if both host and port are non-zero values.
func (APIEndpoint) IsZero ¶
func (v APIEndpoint) IsZero() bool
IsZero returns true if both host and port are zero values.
func (APIEndpoint) String ¶
func (v APIEndpoint) String() string
String returns a formatted version HOST:PORT of this APIEndpoint.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetConditions ¶
func (c *Cluster) GetConditions() Conditions
func (*Cluster) SetConditions ¶
func (c *Cluster) SetConditions(conditions Conditions)
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterNetwork ¶
type ClusterNetwork struct { // APIServerPort specifies the port the API Server should bind to. // Defaults to 6443. // +optional APIServerPort *int32 `json:"apiServerPort,omitempty"` // The network ranges from which service VIPs are allocated. // +optional Services *NetworkRanges `json:"services,omitempty"` // The network ranges from which Pod networks are allocated. // +optional Pods *NetworkRanges `json:"pods,omitempty"` // Domain name for services. // +optional ServiceDomain string `json:"serviceDomain,omitempty"` }
ClusterNetwork specifies the different networking parameters for a cluster.
func (*ClusterNetwork) DeepCopy ¶
func (in *ClusterNetwork) DeepCopy() *ClusterNetwork
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetwork.
func (*ClusterNetwork) DeepCopyInto ¶
func (in *ClusterNetwork) DeepCopyInto(out *ClusterNetwork)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPhase ¶
type ClusterPhase string
ClusterPhase is a string representation of a Cluster Phase.
This type is a high-level indicator of the status of the Cluster as it is provisioned, from the API user’s perspective.
The value should not be interpreted by any software components as a reliable indication of the actual state of the Cluster, and controllers should not use the Cluster Phase field value when making decisions about what action to take.
Controllers should always look at the actual state of the Cluster’s fields to make those decisions.
type ClusterSpec ¶
type ClusterSpec struct { // Paused can be used to prevent controllers from processing the Cluster and all its associated objects. // +optional Paused bool `json:"paused,omitempty"` // Cluster network configuration. // +optional ClusterNetwork *ClusterNetwork `json:"clusterNetwork,omitempty"` // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. // +optional ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` // ControlPlaneRef is an optional reference to a provider-specific resource that holds // the details for provisioning the Control Plane for a Cluster. // +optional ControlPlaneRef *corev1.ObjectReference `json:"controlPlaneRef,omitempty"` // InfrastructureRef is a reference to a provider-specific resource that holds the details // for provisioning infrastructure for a cluster in said provider. // +optional InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct { // FailureDomains is a slice of failure domain objects synced from the infrastructure provider. FailureDomains FailureDomains `json:"failureDomains,omitempty"` // FailureReason indicates that there is a fatal problem reconciling the // state, and will be set to a token value suitable for // programmatic interpretation. // +optional FailureReason *ClusterStatusError `json:"failureReason,omitempty"` // FailureMessage indicates that there is a fatal problem reconciling the // state, and will be set to a descriptive error message. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // Phase represents the current phase of cluster actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional Phase string `json:"phase,omitempty"` // InfrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` // ControlPlaneInitialized defines if the control plane has been initialized. // +optional ControlPlaneInitialized bool `json:"controlPlaneInitialized"` // ControlPlaneReady defines if the control plane is ready. // +optional ControlPlaneReady bool `json:"controlPlaneReady,omitempty"` // Conditions defines current service state of the cluster. // +optional Conditions Conditions `json:"conditions,omitempty"` // ObservedGeneration is the latest generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterStatus) GetTypedPhase ¶
func (c *ClusterStatus) GetTypedPhase() ClusterPhase
GetTypedPhase attempts to parse the Phase field and return the typed ClusterPhase representation as described in `machine_phase_types.go`.
func (*ClusterStatus) SetTypedPhase ¶
func (c *ClusterStatus) SetTypedPhase(p ClusterPhase)
SetTypedPhase sets the Phase field to the string representation of ClusterPhase.
type ClusterStatusError ¶
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" )
type Condition ¶
type Condition struct { // Type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. // +required Type ConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. // +required Status corev1.ConditionStatus `json:"status"` // Severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional Severity ConditionSeverity `json:"severity,omitempty"` // Last time the condition transitioned from one status to another. // This should be when the underlying condition changed. If that is not known, then using the time when // the API field changed is acceptable. // +required LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may not be empty. // +optional Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. // This field may be empty. // +optional Message string `json:"message,omitempty"` }
Condition defines an observation of a Cluster API resource operational state.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionSeverity ¶
type ConditionSeverity string
ConditionSeverity expresses the severity of a Condition Type failing.
const ( // ConditionSeverityError specifies that a condition with `Status=False` is an error. ConditionSeverityError ConditionSeverity = "Error" // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. ConditionSeverityWarning ConditionSeverity = "Warning" // ConditionSeverityInfo specifies that a condition with `Status=False` is informative. ConditionSeverityInfo ConditionSeverity = "Info" // ConditionSeverityNone should apply only to conditions with `Status=True`. ConditionSeverityNone ConditionSeverity = "" )
type Conditions ¶
type Conditions []Condition
Conditions provide observations of the operational state of a Cluster API resource.
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailureDomainSpec ¶
type FailureDomainSpec struct { // ControlPlane determines if this failure domain is suitable for use by control plane machines. // +optional ControlPlane bool `json:"controlPlane"` // Attributes is a free form map of attributes an infrastructure provider might use or require. // +optional Attributes map[string]string `json:"attributes,omitempty"` }
FailureDomainSpec is the Schema for Cluster API failure domains. It allows controllers to understand how many failure domains a cluster can optionally span across.
func (*FailureDomainSpec) DeepCopy ¶
func (in *FailureDomainSpec) DeepCopy() *FailureDomainSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomainSpec.
func (*FailureDomainSpec) DeepCopyInto ¶
func (in *FailureDomainSpec) DeepCopyInto(out *FailureDomainSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailureDomains ¶
type FailureDomains map[string]FailureDomainSpec
FailureDomains is a slice of FailureDomains.
func (FailureDomains) DeepCopy ¶
func (in FailureDomains) DeepCopy() FailureDomains
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomains.
func (FailureDomains) DeepCopyInto ¶
func (in FailureDomains) DeepCopyInto(out *FailureDomains)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (FailureDomains) FilterControlPlane ¶
func (in FailureDomains) FilterControlPlane() FailureDomains
FilterControlPlane returns a FailureDomain slice containing only the domains suitable to be used for control plane nodes.
func (FailureDomains) GetIDs ¶
func (in FailureDomains) GetIDs() []*string
GetIDs returns a slice containing the ids for failure domains
type NetworkRanges ¶
type NetworkRanges struct {
CIDRBlocks []string `json:"cidrBlocks"`
}
NetworkRanges represents ranges of network addresses.
func (*NetworkRanges) DeepCopy ¶
func (in *NetworkRanges) DeepCopy() *NetworkRanges
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRanges.
func (*NetworkRanges) DeepCopyInto ¶
func (in *NetworkRanges) DeepCopyInto(out *NetworkRanges)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkRanges) String ¶
func (n *NetworkRanges) String() string