Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the turtles-capi.cattle.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=turtles-capi.cattle.io
Index ¶
- Constants
- Variables
- func AddKnownTypes(scheme *runtime.Scheme)
- type CAPIProvider
- func (in *CAPIProvider) DeepCopy() *CAPIProvider
- func (in *CAPIProvider) DeepCopyInto(out *CAPIProvider)
- func (in *CAPIProvider) DeepCopyObject() runtime.Object
- func (b *CAPIProvider) GetConditions() clusterv1.Conditions
- func (b *CAPIProvider) GetSpec() operatorv1.ProviderSpec
- func (b *CAPIProvider) GetStatus() operatorv1.ProviderStatus
- func (b *CAPIProvider) GetType() string
- func (b *CAPIProvider) ProviderName() string
- func (b *CAPIProvider) SetConditions(conditions clusterv1.Conditions)
- func (b *CAPIProvider) SetPhase(p Phase)
- func (b *CAPIProvider) SetSpec(in operatorv1.ProviderSpec)
- func (b *CAPIProvider) SetStatus(in operatorv1.ProviderStatus)
- func (b *CAPIProvider) SetVariables(v map[string]string)
- type CAPIProviderList
- type CAPIProviderSpec
- type CAPIProviderStatus
- type Credentials
- type Features
- type Phase
- type Type
- type WorkloadIdentityRef
Constants ¶
const ( // RancherCredentialsSecretCondition provides information on Rancher credentials secret mapping result. RancherCredentialsSecretCondition clusterv1.ConditionType = "RancherCredentialsSecretMapped" // RancherCredentialKeyMissing notifies about missing credential secret key required for provider during credentials mapping. RancherCredentialKeyMissing = "RancherCredentialKeyMissing" // RancherCredentialSourceMissing occures when a source credential secret is missing. RancherCredentialSourceMissing = "RancherCredentialSourceMissing" // LastAppliedConfigurationTime is set as a timestamp infor of the last configuration update byt the CAPI Operator resource. LastAppliedConfigurationTime = "LastAppliedConfigurationTime" )
const Kind = "CAPIProvider"
Kind is a CAPIProvider kind string.
const (
// ProviderFinalizer is the finalizer apply on the CAPI Provider resource.
ProviderFinalizer = "capiprovider.turtles.cattle.io"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "turtles-capi.cattle.io", Version: "v1alpha1"} // 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 // Providers is a list of registered CAPI Operator resources satisfying Provider interface. Providers = []operatorv1.GenericProvider{ &operatorv1.CoreProvider{}, &operatorv1.BootstrapProvider{}, &operatorv1.ControlPlaneProvider{}, &operatorv1.InfrastructureProvider{}, &operatorv1.AddonProvider{}, &operatorv1.IPAMProvider{}, } // ProviderLists is a list of registered CAPI Operator resources satisfying ProviderList interface. ProviderLists = []operatorv1.GenericProviderList{ &operatorv1.CoreProviderList{}, &operatorv1.BootstrapProviderList{}, &operatorv1.ControlPlaneProviderList{}, &operatorv1.InfrastructureProviderList{}, &operatorv1.AddonProviderList{}, &operatorv1.IPAMProviderList{}, } )
Functions ¶
func AddKnownTypes ¶
AddKnownTypes adds the list of known types to api.Scheme.
Types ¶
type CAPIProvider ¶
type CAPIProvider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:example={name: aws, version: "v2.3.0", type: infrastructure, credentials: {rancherCloudCredential: user-credential}} Spec CAPIProviderSpec `json:"spec,omitempty"` // +kubebuilder:default={} Status CAPIProviderStatus `json:"status,omitempty"` }
CAPIProvider is the Schema for the CAPI Providers API.
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="ProviderName",type="string",JSONPath=".spec.name" +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase"
func (*CAPIProvider) DeepCopy ¶
func (in *CAPIProvider) DeepCopy() *CAPIProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIProvider.
func (*CAPIProvider) DeepCopyInto ¶
func (in *CAPIProvider) DeepCopyInto(out *CAPIProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CAPIProvider) DeepCopyObject ¶
func (in *CAPIProvider) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CAPIProvider) GetConditions ¶
func (b *CAPIProvider) GetConditions() clusterv1.Conditions
GetConditions returns the Conditions field from the CAPIProvider status.
func (*CAPIProvider) GetSpec ¶
func (b *CAPIProvider) GetSpec() operatorv1.ProviderSpec
GetSpec returns the Spec field in the CAPIProvider status.
func (*CAPIProvider) GetStatus ¶
func (b *CAPIProvider) GetStatus() operatorv1.ProviderStatus
GetStatus returns the Status.ProviderStatus field in the CAPIProvider status.
func (*CAPIProvider) GetType ¶
func (b *CAPIProvider) GetType() string
GetType returns the type of the CAPIProvider.
func (*CAPIProvider) ProviderName ¶
func (b *CAPIProvider) ProviderName() string
ProviderName is a name for the managed CAPI provider resource.
func (*CAPIProvider) SetConditions ¶
func (b *CAPIProvider) SetConditions(conditions clusterv1.Conditions)
SetConditions updates the Conditions field in the CAPIProvider status.
func (*CAPIProvider) SetPhase ¶
func (b *CAPIProvider) SetPhase(p Phase)
SetPhase updates the Phase field in the CAPIProvider status.
func (*CAPIProvider) SetSpec ¶
func (b *CAPIProvider) SetSpec(in operatorv1.ProviderSpec)
SetSpec updates the Spec field in the CAPIProvider status.
func (*CAPIProvider) SetStatus ¶
func (b *CAPIProvider) SetStatus(in operatorv1.ProviderStatus)
SetStatus updates the Status.ProviderStatus field in the CAPIProvider status.
func (*CAPIProvider) SetVariables ¶
func (b *CAPIProvider) SetVariables(v map[string]string)
SetVariables updates the Variables field in the CAPIProvider status.
type CAPIProviderList ¶
type CAPIProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CAPIProvider `json:"items"` }
CAPIProviderList contains a list of CAPIProviders.
func (*CAPIProviderList) DeepCopy ¶
func (in *CAPIProviderList) DeepCopy() *CAPIProviderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIProviderList.
func (*CAPIProviderList) DeepCopyInto ¶
func (in *CAPIProviderList) DeepCopyInto(out *CAPIProviderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CAPIProviderList) DeepCopyObject ¶
func (in *CAPIProviderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CAPIProviderList) GetItems ¶
func (b *CAPIProviderList) GetItems() []operatorv1.GenericProvider
GetItems returns the list of GenericProviders for CAPIProviderList.
type CAPIProviderSpec ¶
type CAPIProviderSpec struct { // Name is the name of the provider to enable // +optional // +kubebuilder:example=aws Name string `json:"name"` // Type is the type of the provider to enable // +required // +kubebuilder:validation:Enum=infrastructure;core;controlPlane;bootstrap;addon // +kubebuilder:example=infrastructure Type Type `json:"type"` // Credentials is the structure holding the credentials to use for the provider. Only one credential type could be set at a time. // +kubebuilder:example={rancherCloudCredential: user-credential} // +optional Credentials *Credentials `json:"credentials,omitempty"` // Features is a collection of features to enable. // +optional // +kubebuilder:example={machinePool: true, clusterResourceSet: true, clusterTopology: true} Features *Features `json:"features,omitempty"` // Variables is a map of environment variables to add to the content of the ConfigSecret // +optional // +kubebuilder:example={CLUSTER_TOPOLOGY:"true",EXP_CLUSTER_RESOURCE_SET:"true",EXP_MACHINE_POOL: "true"} Variables map[string]string `json:"variables,omitempty"` // ProviderSpec is the spec of the underlying CAPI Provider resource. operatorv1.ProviderSpec `json:",inline"` }
CAPIProviderSpec defines the desired state of CAPIProvider. +kubebuilder:validation:XValidation:message="CAPI Provider version should be in the semver format prefixed with 'v'. Example: v1.9.3",rule="!has(self.version) || self.version.matches(r\"\"\"^v([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?$\"\"\")" +kubebuilder:validation:XValidation:message="Config secret namespace is always equal to the resource namespace and should not be set.",rule="!has(self.configSecret) || !has(self.configSecret.__namespace__)" +kubebuilder:validation:XValidation:message="Either fetchConfig or name should be set.",rule="has(self.fetchConfig.url) || has(self.fetchConfig.selector) || has(self.name)"
func (*CAPIProviderSpec) DeepCopy ¶
func (in *CAPIProviderSpec) DeepCopy() *CAPIProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIProviderSpec.
func (*CAPIProviderSpec) DeepCopyInto ¶
func (in *CAPIProviderSpec) DeepCopyInto(out *CAPIProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CAPIProviderStatus ¶
type CAPIProviderStatus struct { // Indicates the provider status // +kubebuilder:default=Pending Phase Phase `json:"phase,omitempty"` // Variables is a map of environment variables added to the content of the ConfigSecret // +kubebuilder:default={CLUSTER_TOPOLOGY:"true",EXP_CLUSTER_RESOURCE_SET:"true",EXP_MACHINE_POOL: "true"} Variables map[string]string `json:"variables,omitempty"` operatorv1.ProviderStatus `json:",inline"` }
CAPIProviderStatus defines the observed state of CAPIProvider.
func (*CAPIProviderStatus) DeepCopy ¶
func (in *CAPIProviderStatus) DeepCopy() *CAPIProviderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIProviderStatus.
func (*CAPIProviderStatus) DeepCopyInto ¶
func (in *CAPIProviderStatus) DeepCopyInto(out *CAPIProviderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Credentials ¶
type Credentials struct { // RancherCloudCredential is the Rancher Cloud Credential name RancherCloudCredential string `json:"rancherCloudCredential,omitempty"` // RancherCloudCredentialNamespaceName is the Rancher Cloud Credential namespace:name reference RancherCloudCredentialNamespaceName string `json:"rancherCloudCredentialNamespaceName,omitempty"` }
Credentials defines the external credentials information for the provider. +kubebuilder:validation:MaxProperties=1 +kubebuilder:validation:MinProperties=1 +kubebuilder:validation:XValidation:message="rancherCloudCredentialNamespaceName should be in the namespace:name format.",rule="!has(self.rancherCloudCredentialNamespaceName) || self.rancherCloudCredentialNamespaceName.matches('^.+:.+$')" +structType=atomic
func (*Credentials) DeepCopy ¶
func (in *Credentials) DeepCopy() *Credentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Credentials.
func (*Credentials) DeepCopyInto ¶
func (in *Credentials) DeepCopyInto(out *Credentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Features ¶
type Features struct { // MachinePool if set to true will enable the machine pool feature. MachinePool bool `json:"machinePool,omitempty"` // ClusterResourceSet if set to true will enable the cluster resource set feature. ClusterResourceSet bool `json:"clusterResourceSet,omitempty"` // ClusterTopology if set to true will enable the clusterclass feature. ClusterTopology bool `json:"clusterTopology,omitempty"` }
Features defines a collection of features for the CAPI Provider to apply.
func (*Features) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features.
func (*Features) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Phase ¶
type Phase string
Phase defines the current state of the CAPI Provider resource.
const ( // Pending status identifies a provder which has not yet started provisioning. Pending Phase = "Pending" // Provisioning status defines provider in a provisioning state. Provisioning Phase = "Provisioning" // Ready status identifies that the provider is ready to be used. Ready Phase = "Ready" // Failed status defines a failed state of provider provisioning. Failed Phase = "Failed" )
type Type ¶
type Type string
Type defines the type of the CAPI Provider.
const ( // Infrastructure is the name for the infrastructure CAPI Provider. Infrastructure Type = "infrastructure" // Core is the name for core CAPI Provider. Core Type = "core" // ControlPlane is the name for the controlPlane CAPI Provider. ControlPlane Type = "controlPlane" // Bootstrap is the name for the bootstrap CAPI Provider. Bootstrap Type = "bootstrap" // Addon is the name for the addon CAPI Provider. Addon Type = "addon" // IPAM is the name for the addon for IPAM CAPI Provider. IPAM Type = "ipam" )
type WorkloadIdentityRef ¶
type WorkloadIdentityRef struct { // Name of the identity // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Kind of the identity Kind string `json:"kind"` }
WorkloadIdentityRef is a reference to an identity to be used when reconciling the cluster.
func (*WorkloadIdentityRef) DeepCopy ¶
func (in *WorkloadIdentityRef) DeepCopy() *WorkloadIdentityRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadIdentityRef.
func (*WorkloadIdentityRef) DeepCopyInto ¶
func (in *WorkloadIdentityRef) DeepCopyInto(out *WorkloadIdentityRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.