v1alpha3

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 45

Documentation

Overview

Package v1alpha3 contains API Schema definitions for the clusterctl v1alpha3 API group +kubebuilder:object:generate=true +groupName=clusterctl.cluster.x-k8s.io

Index

Constants

View Source
const (
	// CertManagerVersionAnnotation reports the cert manager version installed by clusterctl.
	CertManagerVersionAnnotation = "cert-manager.clusterctl.cluster.x-k8s.io/version"

	// SkipCRDNamePreflightCheckAnnotation can be placed on provider CRDs, so that clusterctl doesn't emit a
	// warning if the CRD doesn't comply with Cluster APIs naming scheme.
	// Note: Only CRDs that are referenced by core Cluster API CRDs have to comply with the naming scheme.
	// See the following issue for more information: https://github.com/kubernetes-sigs/cluster-api/issues/5686#issuecomment-1260897278
	SkipCRDNamePreflightCheckAnnotation = "clusterctl.cluster.x-k8s.io/skip-crd-name-preflight-check"

	// DeleteForMoveAnnotation will be set to objects that are going to be deleted from the
	// source cluster after being moved to the target cluster during the clusterctl move operation.
	//
	// It will help any validation webhook to take decision based on it.
	DeleteForMoveAnnotation = "clusterctl.cluster.x-k8s.io/delete-for-move"

	// BlockMoveAnnotation prevents the cluster move operation from starting if it is defined on at least one
	// of the objects in scope.
	// Provider controllers are expected to set the annotation on resources that cannot be instantaneously
	// paused and remove the annotation when the resource has been actually paused.
	//
	// e.g. If this annotation is defined with any value on an InfraMachine resource to be moved when
	// `clusterctl move` is invoked, then NO resources for ANY workload cluster will be created on the
	// destination management cluster until the annotation is removed.
	BlockMoveAnnotation = "clusterctl.cluster.x-k8s.io/block-move"
)
View Source
const (
	// ClusterctlLabel is applied to all components managed by clusterctl.
	ClusterctlLabel = "clusterctl.cluster.x-k8s.io"

	// ClusterctlCoreLabel is applied to all the core objects managed by clusterctl.
	ClusterctlCoreLabel = "clusterctl.cluster.x-k8s.io/core"

	// ClusterctlCoreLabelInventoryValue define the value for ClusterctlCoreLabel to be used for inventory objects.
	ClusterctlCoreLabelInventoryValue = "inventory"

	// ClusterctlCoreLabelCertManagerValue define the value for ClusterctlCoreLabel to be used for cert-manager objects.
	ClusterctlCoreLabelCertManagerValue = "cert-manager"

	// ClusterctlMoveLabel can be set on CRDs that providers wish to move but that are not part of a Cluster.
	ClusterctlMoveLabel = "clusterctl.cluster.x-k8s.io/move"

	// ClusterctlMoveHierarchyLabel can be set on CRDs that providers wish to move with their entire hierarchy, but that are not part of a Cluster.
	ClusterctlMoveHierarchyLabel = "clusterctl.cluster.x-k8s.io/move-hierarchy"
)
View Source
const (
	// CoreProviderType is a type reserved for Cluster API core repository.
	CoreProviderType = ProviderType("CoreProvider")

	// BootstrapProviderType is the type associated with codebases that provide
	// bootstrapping capabilities.
	BootstrapProviderType = ProviderType("BootstrapProvider")

	// InfrastructureProviderType is the type associated with codebases that provide
	// infrastructure capabilities.
	InfrastructureProviderType = ProviderType("InfrastructureProvider")

	// ControlPlaneProviderType is the type associated with codebases that provide
	// control-plane capabilities.
	ControlPlaneProviderType = ProviderType("ControlPlaneProvider")

	// IPAMProviderType is the type associated with codebases that provide
	// IPAM capabilities.
	IPAMProviderType = ProviderType("IPAMProvider")

	// RuntimeExtensionProviderType is the type associated with codebases that provide
	// runtime extensions.
	RuntimeExtensionProviderType = ProviderType("RuntimeExtensionProvider")

	// AddonProviderType is the type associated with codebases that provide
	// add-on capabilities.
	AddonProviderType = ProviderType("AddonProvider")

	// ProviderTypeUnknown is used when the type is unknown.
	ProviderTypeUnknown = ProviderType("")
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "clusterctl.cluster.x-k8s.io", Version: "v1alpha3"}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

func ManifestLabel

func ManifestLabel(name string, providerType ProviderType) string

ManifestLabel returns the cluster.x-k8s.io/provider label value for a provider/type.

Note: the label uniquely describes the provider type and its kind (e.g. bootstrap-kubeadm); it's not meant to be used to describe each instance of a particular provider.

Types

type Metadata

type Metadata struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	ReleaseSeries []ReleaseSeries `json:"releaseSeries"`
}

Metadata for a provider repository.

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Metadata) DeepCopyObject

func (in *Metadata) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Metadata) GetReleaseSeriesForContract added in v0.3.20

func (m *Metadata) GetReleaseSeriesForContract(contract string) *ReleaseSeries

GetReleaseSeriesForContract returns the release series for a given API Version, e.g. `v1alpha4`. If more than one release series use the same contract then the latest newer release series is returned.

func (*Metadata) GetReleaseSeriesForVersion

func (m *Metadata) GetReleaseSeriesForVersion(version *version.Version) *ReleaseSeries

GetReleaseSeriesForVersion returns the release series for a given version.

type Provider

type Provider struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// ProviderName indicates the name of the provider.
	// +optional
	ProviderName string `json:"providerName,omitempty"`

	// Type indicates the type of the provider.
	// See ProviderType for a list of supported values
	// +optional
	Type string `json:"type,omitempty"`

	// Version indicates the component version.
	// +optional
	Version string `json:"version,omitempty"`

	// WatchedNamespace indicates the namespace where the provider controller is watching.
	// If empty the provider controller is watching for objects in all namespaces.
	//
	// Deprecated: providers complying with the Cluster API v1alpha4 contract or above must watch all namespaces; this field will be removed in a future version of this API
	// +optional
	WatchedNamespace string `json:"watchedNamespace,omitempty"`
}

Provider defines an entry in the provider inventory.

func (*Provider) DeepCopy

func (in *Provider) DeepCopy() *Provider

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Provider.

func (*Provider) DeepCopyInto

func (in *Provider) DeepCopyInto(out *Provider)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Provider) DeepCopyObject

func (in *Provider) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Provider) Equals

func (p *Provider) Equals(other Provider) bool

Equals returns true if two providers are identical (same name, provider name, type, version etc.).

func (*Provider) GetProviderType

func (p *Provider) GetProviderType() ProviderType

GetProviderType parse the Provider.Type string field and return the typed representation.

func (*Provider) InstanceName

func (p *Provider) InstanceName() string

InstanceName return the a name that uniquely identifies an entry in the provider inventory. The instanceName is composed by the ManifestLabel and by the namespace where the provider is installed; the resulting value uniquely identify a provider instance because clusterctl does not support multiple instances of the same provider to be installed in the same namespace.

func (*Provider) ManifestLabel

func (p *Provider) ManifestLabel() string

ManifestLabel returns the cluster.x-k8s.io/provider label value for an entry in the provider inventory. Please note that this label uniquely identifies the provider, e.g. bootstrap-kubeadm, but not the instances of the provider, e.g. namespace-1/bootstrap-kubeadm and namespace-2/bootstrap-kubeadm.

func (*Provider) SameAs

func (p *Provider) SameAs(other Provider) bool

SameAs returns true if two providers have the same ProviderName and Type. Please note that there could be many instances of the same provider.

type ProviderList

type ProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Provider `json:"items"`
}

ProviderList contains a list of Provider.

func (*ProviderList) DeepCopy

func (in *ProviderList) DeepCopy() *ProviderList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderList.

func (*ProviderList) DeepCopyInto

func (in *ProviderList) DeepCopyInto(out *ProviderList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProviderList) DeepCopyObject

func (in *ProviderList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ProviderList) FilterByNamespace

func (l *ProviderList) FilterByNamespace(namespace string) []Provider

FilterByNamespace returns a new list of providers that reside in the namespace provided.

func (*ProviderList) FilterByProviderNameAndType

func (l *ProviderList) FilterByProviderNameAndType(provider string, providerType ProviderType) []Provider

FilterByProviderNameAndType returns a new list of provider that match the name and type.

func (*ProviderList) FilterByProviderNameNamespaceTypeVersion added in v1.2.0

func (l *ProviderList) FilterByProviderNameNamespaceTypeVersion(provider, namespace string, providerType ProviderType, version string) []Provider

FilterByProviderNameNamespaceTypeVersion returns a new list of provider that match the name, namespace, type and version.

func (*ProviderList) FilterByType

func (l *ProviderList) FilterByType(providerType ProviderType) []Provider

FilterByType returns a new list of providers that match the given type.

func (*ProviderList) FilterCore

func (l *ProviderList) FilterCore() []Provider

FilterCore returns a new list of providers that are in the core.

func (*ProviderList) FilterNonCore

func (l *ProviderList) FilterNonCore() []Provider

FilterNonCore returns a new list of providers that are not in the core.

type ProviderType

type ProviderType string

ProviderType is a string representation of a Provider type.

func (ProviderType) Order

func (p ProviderType) Order() int

Order return an integer that can be used to sort ProviderType values.

type ReleaseSeries

type ReleaseSeries struct {
	// Major version of the release series
	Major uint `json:"major,omitempty"`

	// Minor version of the release series
	Minor uint `json:"minor,omitempty"`

	// Contract defines the Cluster API contract supported by this series.
	//
	// The value is an API Version, e.g. `v1alpha3`.
	Contract string `json:"contract,omitempty"`
}

ReleaseSeries maps a provider release series (major/minor) with a API Version of Cluster API (contract).

func (*ReleaseSeries) DeepCopy

func (in *ReleaseSeries) DeepCopy() *ReleaseSeries

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseSeries.

func (*ReleaseSeries) DeepCopyInto

func (in *ReleaseSeries) DeepCopyInto(out *ReleaseSeries)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL