Documentation ¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the infrastructure v1alpha2 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Index ¶
- Constants
- Variables
- func ClusterNameRoleTag(clusterName, role string) string
- func ClusterNameTag(clusterName string) string
- func DOSafeName(name string) string
- func NameTagFromName(name string) string
- type APIEndpoint
- type BuildTagParams
- type DOCluster
- type DOClusterList
- type DOClusterSpec
- type DOClusterStatus
- type DOLoadBalancer
- type DOLoadBalancerHealthCheck
- type DOMachine
- type DOMachineList
- type DOMachineSpec
- type DOMachineStatus
- type DOMachineTemplate
- type DOMachineTemplateList
- type DOMachineTemplateResource
- type DOMachineTemplateSpec
- type DONetwork
- type DONetworkResource
- type DOResourceReference
- type DOResourceStatus
- type Tags
Constants ¶
const ( // NameDigitalOceanProviderPrefix is the tag prefix for // cluster-api-provider-digitalocean owned components NameDigitalOceanProviderPrefix = "sigs-k8s-io:capdo" // APIServerRoleTagValue describes the value for the apiserver role APIServerRoleTagValue = "apiserver" // NodeRoleTagValue describes the value for the node role NodeRoleTagValue = "node" )
const ( // ClusterFinalizer allows ReconcileDOCluster to clean up DigitalOcean resources associated with DOCluster before // removing it from the apiserver. ClusterFinalizer = "docluster.infrastructure.cluster.x-k8s.io" )
const ( // MachineFinalizer allows ReconcileDOMachine to clean up DigitalOcean resources associated with DOMachine before // removing it from the apiserver. MachineFinalizer = "domachine.infrastructure.cluster.x-k8s.io" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( // DOResourceStatusNew is the string representing a DigitalOcean resource just created and in a provisioning state. DOResourceStatusNew = DOResourceStatus("new") // DOResourceStatusRunning is the string representing a DigitalOcean resource already provisioned and in a active state. DOResourceStatusRunning = DOResourceStatus("active") // DOResourceStatusErrored is the string representing a DigitalOcean resource in a errored state. DOResourceStatusErrored = DOResourceStatus("errored") // DOResourceStatusOff is the string representing a DigitalOcean resource in off state. DOResourceStatusOff = DOResourceStatus("off") // DOResourceStatusArchive is the string representing a DigitalOcean resource in archive state. DOResourceStatusArchive = DOResourceStatus("archive") )
var ( DefaultLBPort = 6443 DefaultLBAlgorithm = "round_robin" DefaultLBHealthCheckInterval = 10 DefaultLBHealthCheckTimeout = 5 DefaultLBHealthCheckUnhealthyThreshold = 3 DefaultLBHealthCheckHealthyThreshold = 5 )
Functions ¶
func ClusterNameRoleTag ¶
ClusterNameRoleTag generates the tag with prefix `NameDigitalOceanProviderPrefix` and `RoleValue` as suffix It will generated tag like `sigs-k8s-io:capdo:{clusterName}:{role}`.
func ClusterNameTag ¶
ClusterNameTag generates the tag with prefix `NameDigitalOceanProviderPrefix` for resources associated with a cluster. It will generated tag like `sigs-k8s-io:capdo:{clusterName}`.
func DOSafeName ¶
DOSafeName returns DigitalOcean safe name with replacing '.' and '/' to '-' since DigitalOcean doesn't support naming with those character.
func NameTagFromName ¶
NameTagFromName returns DigitalOcean safe name tag from name.
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 int `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.
type BuildTagParams ¶
type BuildTagParams struct { // ClusterName is the cluster associated with the resource. ClusterName string // Name is the name of the resource, it's applied as the tag "name" on DigitalOcean. Name string // Role is the role associated to the resource. Role string // Any additional tags to be added to the resource. // +optional Additional Tags }
BuildTagParams is used to build tags around an DigitalOcean resource.
func (*BuildTagParams) DeepCopy ¶
func (in *BuildTagParams) DeepCopy() *BuildTagParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildTagParams.
func (*BuildTagParams) DeepCopyInto ¶
func (in *BuildTagParams) DeepCopyInto(out *BuildTagParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOCluster ¶
type DOCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DOClusterSpec `json:"spec,omitempty"` Status DOClusterStatus `json:"status,omitempty"` }
DOCluster is the Schema for the dOClusters API.
func (*DOCluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOCluster.
func (*DOCluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOCluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOClusterList ¶
type DOClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DOCluster `json:"items"` }
DOClusterList contains a list of DOCluster.
func (*DOClusterList) DeepCopy ¶
func (in *DOClusterList) DeepCopy() *DOClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOClusterList.
func (*DOClusterList) DeepCopyInto ¶
func (in *DOClusterList) DeepCopyInto(out *DOClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOClusterList) DeepCopyObject ¶
func (in *DOClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOClusterSpec ¶
type DOClusterSpec struct { // The DigitalOcean Region the cluster lives in. // It must be one of available region on DigitalOcean. See https://developers.digitalocean.com/documentation/v2/#list-all-regions Region string `json:"region"` // Network configurations // +optional Network DONetwork `json:"network,omitempty"` }
DOClusterSpec defines the desired state of DOCluster.
func (*DOClusterSpec) DeepCopy ¶
func (in *DOClusterSpec) DeepCopy() *DOClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOClusterSpec.
func (*DOClusterSpec) DeepCopyInto ¶
func (in *DOClusterSpec) DeepCopyInto(out *DOClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOClusterStatus ¶
type DOClusterStatus struct { // Ready denotes that the cluster (infrastructure) is ready. // +optional Ready bool `json:"ready"` // APIEndpoints represents the endpoints to communicate with the control plane. // +optional APIEndpoints []APIEndpoint `json:"apiEndpoints,omitempty"` // Network encapsulates all things related to DigitalOcean network. // +optional Network DONetworkResource `json:"network,omitempty"` }
DOClusterStatus defines the observed state of DOCluster.
func (*DOClusterStatus) DeepCopy ¶
func (in *DOClusterStatus) DeepCopy() *DOClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOClusterStatus.
func (*DOClusterStatus) DeepCopyInto ¶
func (in *DOClusterStatus) DeepCopyInto(out *DOClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOLoadBalancer ¶
type DOLoadBalancer struct { // API Server port. It must be valid ports range (1-65535). If omitted, default value is 6443. // +optional // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 Port int `json:"port,omitempty"` // The API Server load balancing algorithm used to determine which backend Droplet will be selected by a client. // It must be either "round_robin" or "least_connections". The default value is "round_robin". // +optional // +kubebuilder:validation:Enum=round_robin;least_connections Algorithm string `json:"algorithm,omitempty"` // An object specifying health check settings for the Load Balancer. If omitted, default values will be provided. // +optional HealthCheck DOLoadBalancerHealthCheck `json:"healthCheck,omitempty"` }
DOLoadBalancer define the DigitalOcean loadbalancers configurations.
func (*DOLoadBalancer) ApplyDefault ¶
func (in *DOLoadBalancer) ApplyDefault()
ApplyDefault give APIServerLoadbalancers default values.
func (*DOLoadBalancer) DeepCopy ¶
func (in *DOLoadBalancer) DeepCopy() *DOLoadBalancer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOLoadBalancer.
func (*DOLoadBalancer) DeepCopyInto ¶
func (in *DOLoadBalancer) DeepCopyInto(out *DOLoadBalancer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOLoadBalancerHealthCheck ¶
type DOLoadBalancerHealthCheck struct { // The number of seconds between between two consecutive health checks. The value must be between 3 and 300. // If not specified, the default value is 10. // +optional // +kubebuilder:validation:Minimum=3 // +kubebuilder:validation:Maximum=300 Interval int `json:"interval,omitempty"` // The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. // The value must be between 3 and 300. If not specified, the default value is 5. // +optional // +kubebuilder:validation:Minimum=3 // +kubebuilder:validation:Maximum=300 Timeout int `json:"timeout,omitempty"` // The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. // The vaule must be between 2 and 10. If not specified, the default value is 3. // +optional // +kubebuilder:validation:Minimum=2 // +kubebuilder:validation:Maximum=10 UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` // The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. // The vaule must be between 2 and 10. If not specified, the default value is 5. // +optional // +kubebuilder:validation:Minimum=2 // +kubebuilder:validation:Maximum=10 HealthyThreshold int `json:"healthyThreshold,omitempty"` }
DOLoadBalancerHealthCheck define the DigitalOcean loadbalancers health check configurations.
func (*DOLoadBalancerHealthCheck) DeepCopy ¶
func (in *DOLoadBalancerHealthCheck) DeepCopy() *DOLoadBalancerHealthCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOLoadBalancerHealthCheck.
func (*DOLoadBalancerHealthCheck) DeepCopyInto ¶
func (in *DOLoadBalancerHealthCheck) DeepCopyInto(out *DOLoadBalancerHealthCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOMachine ¶
type DOMachine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DOMachineSpec `json:"spec,omitempty"` Status DOMachineStatus `json:"status,omitempty"` }
DOMachine is the Schema for the domachines API.
func (*DOMachine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachine.
func (*DOMachine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOMachine) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOMachineList ¶
type DOMachineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DOMachine `json:"items"` }
DOMachineList contains a list of DOMachine.
func (*DOMachineList) DeepCopy ¶
func (in *DOMachineList) DeepCopy() *DOMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineList.
func (*DOMachineList) DeepCopyInto ¶
func (in *DOMachineList) DeepCopyInto(out *DOMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOMachineList) DeepCopyObject ¶
func (in *DOMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOMachineSpec ¶
type DOMachineSpec struct { // ProviderID is the unique identifier as specified by the cloud provider. // +optional ProviderID *string `json:"providerID,omitempty"` // Droplet size. It must be known DigitalOcean droplet size. See https://developers.digitalocean.com/documentation/v2/#list-all-sizes Size string `json:"size"` // Droplet image can be image id or slug. See https://developers.digitalocean.com/documentation/v2/#list-all-images Image intstr.IntOrString `json:"image"` // SSHKeys is the ssh key id or fingerprint to attach in DigitalOcean droplet. // It must be available on DigitalOcean account. See https://developers.digitalocean.com/documentation/v2/#list-all-keys SSHKeys []intstr.IntOrString `json:"sshKeys"` // AdditionalTags is an optional set of tags to add to DigitalOcean resources managed by the DigitalOcean provider. // +optional AdditionalTags Tags `json:"additionalTags,omitempty"` }
DOMachineSpec defines the desired state of DOMachine.
func (*DOMachineSpec) DeepCopy ¶
func (in *DOMachineSpec) DeepCopy() *DOMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineSpec.
func (*DOMachineSpec) DeepCopyInto ¶
func (in *DOMachineSpec) DeepCopyInto(out *DOMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOMachineStatus ¶
type DOMachineStatus struct { // Ready is true when the provider resource is ready. // +optional Ready bool `json:"ready"` // Addresses contains the DigitalOcean droplet associated addresses. Addresses []corev1.NodeAddress `json:"addresses,omitempty"` // InstanceStatus is the status of the DigitalOcean droplet instance for this machine. // +optional InstanceStatus *DOResourceStatus `json:"instanceStatus,omitempty"` // ErrorReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Machine's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. // +optional ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"` // ErrorMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Machine's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. // +optional ErrorMessage *string `json:"errorMessage,omitempty"` }
DOMachineStatus defines the observed state of DOMachine.
func (*DOMachineStatus) DeepCopy ¶
func (in *DOMachineStatus) DeepCopy() *DOMachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineStatus.
func (*DOMachineStatus) DeepCopyInto ¶
func (in *DOMachineStatus) DeepCopyInto(out *DOMachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOMachineTemplate ¶
type DOMachineTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DOMachineTemplateSpec `json:"spec,omitempty"` }
DOMachineTemplate is the Schema for the domachinetemplates API.
func (*DOMachineTemplate) DeepCopy ¶
func (in *DOMachineTemplate) DeepCopy() *DOMachineTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineTemplate.
func (*DOMachineTemplate) DeepCopyInto ¶
func (in *DOMachineTemplate) DeepCopyInto(out *DOMachineTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOMachineTemplate) DeepCopyObject ¶
func (in *DOMachineTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOMachineTemplateList ¶
type DOMachineTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DOMachineTemplate `json:"items"` }
DOMachineTemplateList contains a list of DOMachineTemplate.
func (*DOMachineTemplateList) DeepCopy ¶
func (in *DOMachineTemplateList) DeepCopy() *DOMachineTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineTemplateList.
func (*DOMachineTemplateList) DeepCopyInto ¶
func (in *DOMachineTemplateList) DeepCopyInto(out *DOMachineTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DOMachineTemplateList) DeepCopyObject ¶
func (in *DOMachineTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DOMachineTemplateResource ¶
type DOMachineTemplateResource struct { // Spec is the specification of the desired behavior of the machine. Spec DOMachineSpec `json:"spec"` }
DOMachineTemplateResource describes the data needed to create am DOMachine from a template.
func (*DOMachineTemplateResource) DeepCopy ¶
func (in *DOMachineTemplateResource) DeepCopy() *DOMachineTemplateResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineTemplateResource.
func (*DOMachineTemplateResource) DeepCopyInto ¶
func (in *DOMachineTemplateResource) DeepCopyInto(out *DOMachineTemplateResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOMachineTemplateSpec ¶
type DOMachineTemplateSpec struct {
Template DOMachineTemplateResource `json:"template"`
}
DOMachineTemplateSpec defines the desired state of DOMachineTemplate.
func (*DOMachineTemplateSpec) DeepCopy ¶
func (in *DOMachineTemplateSpec) DeepCopy() *DOMachineTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOMachineTemplateSpec.
func (*DOMachineTemplateSpec) DeepCopyInto ¶
func (in *DOMachineTemplateSpec) DeepCopyInto(out *DOMachineTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DONetwork ¶
type DONetwork struct { // Configures an API Server loadbalancers // +optional APIServerLoadbalancers DOLoadBalancer `json:"apiServerLoadbalancers,omitempty"` }
DONetwork encapsulates DigitalOcean networking configuration.
func (*DONetwork) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DONetwork.
func (*DONetwork) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DONetworkResource ¶
type DONetworkResource struct { // APIServerLoadbalancersRef is the id of apiserver loadbalancers. // +optional APIServerLoadbalancersRef DOResourceReference `json:"apiServerLoadbalancersRef,omitempty"` }
Network encapsulates DigitalOcean networking resources.
func (*DONetworkResource) DeepCopy ¶
func (in *DONetworkResource) DeepCopy() *DONetworkResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DONetworkResource.
func (*DONetworkResource) DeepCopyInto ¶
func (in *DONetworkResource) DeepCopyInto(out *DONetworkResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOResourceReference ¶
type DOResourceReference struct { // ID of DigitalOcean resource // +optional ResourceID string `json:"resourceId,omitempty"` // Status of DigitalOcean resource // +optional ResourceStatus DOResourceStatus `json:"resourceStatus,omitempty"` }
DOResourceReference is a reference to a DigitalOcean resource.
func (*DOResourceReference) DeepCopy ¶
func (in *DOResourceReference) DeepCopy() *DOResourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DOResourceReference.
func (*DOResourceReference) DeepCopyInto ¶
func (in *DOResourceReference) DeepCopyInto(out *DOResourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DOResourceStatus ¶
type DOResourceStatus string
DOResourceStatus describes the status of a DigitalOcean resource.
type Tags ¶
type Tags []string
Tags defines a slice of tags.
func BuildTags ¶
func BuildTags(params BuildTagParams) Tags
BuildTags builds tags including the cluster tag and returns them in map form.
func (Tags) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags.
func (Tags) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.