v1alpha1

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ClusterStackReleasePhaseNone is the default phase.
	ClusterStackReleasePhaseNone = ClusterStackReleasePhase("")

	// ClusterStackReleasePhaseDownloadingAssets is the phase where assets are downloaded from git provider.
	ClusterStackReleasePhaseDownloadingAssets = ClusterStackReleasePhase("downloading release assets")

	// ClusterStackReleasePhaseProviderSpecificWork is the phase where provider-specific work is done.
	ClusterStackReleasePhaseProviderSpecificWork = ClusterStackReleasePhase("provider-specific work")

	// ClusterStackReleasePhaseApplyingObjects is the phase where objects are applied to the management cluster.
	ClusterStackReleasePhaseApplyingObjects = ClusterStackReleasePhase("applying objects")

	// ClusterStackReleasePhaseDone is the phase where all jobs are done.
	ClusterStackReleasePhaseDone = ClusterStackReleasePhase("done")
)
View Source
const (
	// ClusterReadyCondition reports on whether the associated cluster is ready.
	ClusterReadyCondition clusterv1.ConditionType = "ClusterReady"

	// ControlPlaneNotReadyReason is used when the control planes of a cluster are not ready yet.
	ControlPlaneNotReadyReason = "ControlPlaneNotReady"
)
View Source
const (
	// HelmChartAppliedCondition reports on whether the relevant helm chart has been applied.
	HelmChartAppliedCondition clusterv1.ConditionType = "HelmChartApplied"

	// FailedToApplyObjectsReason is used when some objects have been failed to apply.
	FailedToApplyObjectsReason = "FailedToApplyObjects"

	// ObjectsApplyingOngoingReason is used when the objects are still being applied.
	ObjectsApplyingOngoingReason = "ObjectsApplyingOngoing"
)
View Source
const (
	// ProviderClusterStackReleasesSyncedCondition reports on whether the ProviderClusterStackReleases are ready.
	ProviderClusterStackReleasesSyncedCondition = "ProviderClusterStackReleasesSynced"

	// ProviderTemplateNotFoundReason is used when providerTemplate is not found.
	ProviderTemplateNotFoundReason = "ProviderTemplateNotFound"

	// FailedToCreateOrUpdateReason is used when ProviderClusterStackRelease was failed to be created or updated.
	FailedToCreateOrUpdateReason = "FailedToCreateOrUpdate"
)
View Source
const (
	// ClusterStackReleaseAssetsReadyCondition reports on whether the download of cluster stack release assets is complete.
	ClusterStackReleaseAssetsReadyCondition = "ClusterStackReleaseDownloaded"

	// ReleaseAssetsNotDownloadedYetReason is used when release assets are not yet downloaded.
	ReleaseAssetsNotDownloadedYetReason = "ReleaseAssetsNotDownloadedYet"

	// IssueWithReleaseAssetsReason is used when release assets have an issue.
	IssueWithReleaseAssetsReason = "IssueWithReleaseAssets"
)
View Source
const (
	// ProviderClusterStackReleaseReadyCondition reports on whether the relevant provider-specific object is ready.
	ProviderClusterStackReleaseReadyCondition clusterv1.ConditionType = "ProviderClusterStackReleaseReady"

	// ProcessOngoingReason is used when the process of the provider-specific object is still ongoing.
	ProcessOngoingReason = "ProcessOngoing"
)
View Source
const (
	// GitAPIAvailableCondition is used when Git API is available.
	GitAPIAvailableCondition clusterv1.ConditionType = "GitAPIAvailable"

	// GitTokenOrEnvVariableNotSetReason is used when user don't specify the token or environment variable.
	GitTokenOrEnvVariableNotSetReason = "GitTokenOrEnvVariableNotSet" //#nosec
)
View Source
const (
	// GitReleasesSyncedCondition is used when Git releases have been synced successfully.
	GitReleasesSyncedCondition clusterv1.ConditionType = "GitReleasesSynced"

	// FailedToSyncReason is used when Git releases could not be synced.
	FailedToSyncReason = "FailedToSync"
)
View Source
const (
	// ResourceStatusSynced means a resource is synced.
	ResourceStatusSynced = ResourceStatus("synced")
	// ResourceStatusNotSynced means a resource is not synced.
	ResourceStatusNotSynced = ResourceStatus("not-synced")
)
View Source
const (
	// ClusterAddonFinalizer is the finalizer for ClusterAddon objects.
	ClusterAddonFinalizer = "clusteraddon.clusterstack.x-k8s.io"
)
View Source
const (
	// ClusterStackReleaseAvailableCondition reports on whether there is at least one ClusterStackRelease available to use.
	ClusterStackReleaseAvailableCondition = "ClusterStackReleaseAvailable" //#nosec
)
View Source
const (
	// ClusterStackReleaseFinalizer is the finalizer for ClusterStackRelease objects.
	ClusterStackReleaseFinalizer = "clusterstackrelease.clusterstack.x-k8s.io"
)
View Source
const (
	// ClusterStackReleasesSyncedCondition reports on whether the ClusterStackReleases are ready.
	ClusterStackReleasesSyncedCondition = "ClusterStackReleasesSynced" //#nosec
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "clusterstack.x-k8s.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
)
View Source
var ErrNilInput = fmt.Errorf("nil input")

ErrNilInput indicates a nil input.

Functions

This section is empty.

Types

type ClusterAddon

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

	Spec   ClusterAddonSpec   `json:"spec,omitempty"`
	Status ClusterAddonStatus `json:"status,omitempty"`
}

ClusterAddon is the schema for the clusteraddons API.

func (*ClusterAddon) DeepCopy

func (in *ClusterAddon) DeepCopy() *ClusterAddon

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

func (*ClusterAddon) DeepCopyInto

func (in *ClusterAddon) DeepCopyInto(out *ClusterAddon)

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

func (*ClusterAddon) DeepCopyObject

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

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

func (*ClusterAddon) GetConditions

func (r *ClusterAddon) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the ClusterAddon resource.

func (*ClusterAddon) SetConditions

func (r *ClusterAddon) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the ClusterAddon to the predescribed clusterv1.Conditions.

type ClusterAddonList

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

ClusterAddonList contains a list of ClusterAddon.

func (*ClusterAddonList) DeepCopy

func (in *ClusterAddonList) DeepCopy() *ClusterAddonList

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

func (*ClusterAddonList) DeepCopyInto

func (in *ClusterAddonList) DeepCopyInto(out *ClusterAddonList)

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

func (*ClusterAddonList) DeepCopyObject

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

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

type ClusterAddonSpec

type ClusterAddonSpec struct {
	// ClusterStack is the full string <provider>-<name>-<Kubernetes version>-<version> that will be filled with the cluster stack that
	// the respective cluster uses currently. It always matches cluster.spec.topology.class if the work of this controller is done.
	// +optional
	ClusterStack string `json:"clusterStack,omitempty"`

	// Version is the version of the cluster addons that have been applied in the workload cluster.
	// +optional
	Version string `json:"version,omitempty"`

	// ClusterRef is the reference to the clusterv1.Cluster object that corresponds to the workload cluster where this
	// controller applies the cluster addons.
	ClusterRef *corev1.ObjectReference `json:"clusterRef"`
}

ClusterAddonSpec defines the desired state of a ClusterAddon object.

func (*ClusterAddonSpec) DeepCopy

func (in *ClusterAddonSpec) DeepCopy() *ClusterAddonSpec

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

func (*ClusterAddonSpec) DeepCopyInto

func (in *ClusterAddonSpec) DeepCopyInto(out *ClusterAddonSpec)

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

type ClusterAddonStatus

type ClusterAddonStatus struct {
	// Resources specifies the status of the resources that this object administrates.
	// +optional
	Resources []*Resource `json:"resources,omitempty"`

	// +optional
	// +kubebuilder:default:=false
	Ready bool `json:"ready"`

	// Conditions define the current service state of the ClusterAddon.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

ClusterAddonStatus defines the observed state of ClusterAddon.

func (*ClusterAddonStatus) DeepCopy

func (in *ClusterAddonStatus) DeepCopy() *ClusterAddonStatus

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

func (*ClusterAddonStatus) DeepCopyInto

func (in *ClusterAddonStatus) DeepCopyInto(out *ClusterAddonStatus)

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

type ClusterStack

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

	Spec   ClusterStackSpec   `json:"spec,omitempty"`
	Status ClusterStackStatus `json:"status,omitempty"`
}

ClusterStack is the Schema for the clusterstacks API.

func (*ClusterStack) DeepCopy

func (in *ClusterStack) DeepCopy() *ClusterStack

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

func (*ClusterStack) DeepCopyInto

func (in *ClusterStack) DeepCopyInto(out *ClusterStack)

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

func (*ClusterStack) DeepCopyObject

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

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

func (*ClusterStack) GetConditions

func (r *ClusterStack) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the ClusterAddon resource.

func (*ClusterStack) SetConditions

func (r *ClusterStack) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the ClusterAddon to the predescribed clusterv1.Conditions.

type ClusterStackList

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

ClusterStackList contains a list of ClusterStack.

func (*ClusterStackList) DeepCopy

func (in *ClusterStackList) DeepCopy() *ClusterStackList

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

func (*ClusterStackList) DeepCopyInto

func (in *ClusterStackList) DeepCopyInto(out *ClusterStackList)

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

func (*ClusterStackList) DeepCopyObject

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

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

type ClusterStackRelease

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

	Spec   ClusterStackReleaseSpec   `json:"spec,omitempty"`
	Status ClusterStackReleaseStatus `json:"status,omitempty"`
}

ClusterStackRelease is the Schema for the clusterstackreleases API.

func (*ClusterStackRelease) DeepCopy

func (in *ClusterStackRelease) DeepCopy() *ClusterStackRelease

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

func (*ClusterStackRelease) DeepCopyInto

func (in *ClusterStackRelease) DeepCopyInto(out *ClusterStackRelease)

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

func (*ClusterStackRelease) DeepCopyObject

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

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

func (*ClusterStackRelease) GetConditions

func (r *ClusterStackRelease) GetConditions() clusterv1.Conditions

GetConditions returns the observations of the operational state of the ClusterAddon resource.

func (*ClusterStackRelease) SetConditions

func (r *ClusterStackRelease) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the underlying service state of the ClusterAddon to the predescribed clusterv1.Conditions.

type ClusterStackReleaseList

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

ClusterStackReleaseList contains a list of ClusterStackRelease.

func (*ClusterStackReleaseList) DeepCopy

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

func (*ClusterStackReleaseList) DeepCopyInto

func (in *ClusterStackReleaseList) DeepCopyInto(out *ClusterStackReleaseList)

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

func (*ClusterStackReleaseList) DeepCopyObject

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

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

type ClusterStackReleasePhase

type ClusterStackReleasePhase string

ClusterStackReleasePhase is the phase of a ClusterStackRelease object.

type ClusterStackReleaseSpec

type ClusterStackReleaseSpec struct {
	// ProviderRef specifies the reference to the ProviderClusterStackRelease object.
	// It has to be set only if the object exists, i.e. if the noProvider mode is turned off.
	// +optional
	ProviderRef *corev1.ObjectReference `json:"providerRef,omitempty"`
}

ClusterStackReleaseSpec defines the desired state of ClusterStackRelease.

func (*ClusterStackReleaseSpec) DeepCopy

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

func (*ClusterStackReleaseSpec) DeepCopyInto

func (in *ClusterStackReleaseSpec) DeepCopyInto(out *ClusterStackReleaseSpec)

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

type ClusterStackReleaseStatus

type ClusterStackReleaseStatus struct {
	// Resources specifies the status of the resources that this object administrates.
	// +optional
	Resources []*Resource `json:"resources,omitempty"`

	// KubernetesVersion is the Kubernetes version incl. patch version, e.g. 1.26.6.
	// The controller fetches the version from the release assets of the cluster stack.
	// +optional
	KubernetesVersion string `json:"kubernetesVersion,omitempty"`

	// +optional
	// +kubebuilder:default:=false
	Ready bool `json:"ready,omitempty"`

	// Conditions defines current service state of the ClusterAddon.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

ClusterStackReleaseStatus defines the observed state of ClusterStackRelease.

func (*ClusterStackReleaseStatus) DeepCopy

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

func (*ClusterStackReleaseStatus) DeepCopyInto

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

type ClusterStackReleaseSummary

type ClusterStackReleaseSummary struct {
	Name  string                   `json:"name"`
	Ready bool                     `json:"ready"`
	Phase ClusterStackReleasePhase `json:"phase"`

	// +optional
	Message string `json:"message,omitempty"`
}

ClusterStackReleaseSummary gives the summary of the status of a ClusterStackRelease object.

func (*ClusterStackReleaseSummary) DeepCopy

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

func (*ClusterStackReleaseSummary) DeepCopyInto

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

type ClusterStackSpec

type ClusterStackSpec struct {
	// Provider is the name of the cluster stack provider.
	// +kubebuilder:validation:MinLength=1
	Provider string `json:"provider"`

	// Name is the name of the cluster stack.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// KubernetesVersion is the Kubernetes version in the format '<majorVersion>.<minorVersion>', e.g. 1.26.
	// +kubebuilder:validation:Pattern=`^\d\.\d+$`
	KubernetesVersion string `json:"kubernetesVersion"`

	// Channel specifies the release channel of the cluster stack. Defaults to 'stable'.
	// +kubebuilder:default:=stable
	// +kubebuilder:validation:Enum=stable;custom
	Channel version.Channel `json:"channel,omitempty"`

	// Versions is a list of version of the cluster stack that should be available in the management cluster.
	// A version has to have the format 'v<versionNumber>', e.g. v1 for stable channel or, v1-alpha.1 for alpha channel.
	// The versions have to correspond to the channel property.
	// +optional
	Versions []string `json:"versions"`

	// AutoSubscribe is a feature where the operator checks automatically if there are new versions of this cluster stack available.
	// +optional
	// +kubebuilder:default:=true
	AutoSubscribe bool `json:"autoSubscribe"`

	// NoProvider indicates if set on true that there is no provider-specific implementation and operator.
	// +optional
	// +kubebuilder:default:=false
	NoProvider bool `json:"noProvider,omitempty"`

	// ProviderRef has to reference the ProviderClusterStackReleaseTemplate that contains all provider-specific information.
	// +optional
	ProviderRef *corev1.ObjectReference `json:"providerRef,omitempty"`
}

ClusterStackSpec defines the desired state of ClusterStack.

func (*ClusterStackSpec) DeepCopy

func (in *ClusterStackSpec) DeepCopy() *ClusterStackSpec

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

func (*ClusterStackSpec) DeepCopyInto

func (in *ClusterStackSpec) DeepCopyInto(out *ClusterStackSpec)

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

type ClusterStackStatus

type ClusterStackStatus struct {
	// +optional
	LatestRelease string `json:"latestRelease"`

	// +optional
	Summary []ClusterStackReleaseSummary `json:"summary,omitempty"`

	// +optional
	UsableVersions string `json:"usableVersions,omitempty"`

	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

ClusterStackStatus defines the observed state of ClusterStack.

func (*ClusterStackStatus) DeepCopy

func (in *ClusterStackStatus) DeepCopy() *ClusterStackStatus

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

func (*ClusterStackStatus) DeepCopyInto

func (in *ClusterStackStatus) DeepCopyInto(out *ClusterStackStatus)

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

type Resource

type Resource struct {
	// Group specifies the group of the object.
	Group string `json:"group,omitempty"`
	// Version specifies the version of the object.
	Version string `json:"version,omitempty"`
	// Kind specifies the kind of the object.
	Kind string `json:"kind,omitempty"`
	// Namespace specifies the namespace of the object.
	Namespace string `json:"namespace,omitempty"`
	// Name specifies the name of the object.
	Name string `json:"name,omitempty"`
	// Status specifies the status of the object being applied.
	Status ResourceStatus `json:"status,omitempty"`
	// Error specifies the error of the last time this object has been applied.
	Error string `json:"error,omitempty"`
}

Resource defines the status of a resource.

func NewResourceFromUnstructured

func NewResourceFromUnstructured(u *unstructured.Unstructured) *Resource

NewResourceFromUnstructured defines a new resource based on an unstructured object. For a nil input it returns a nil resource.

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

func (*Resource) GroupVersionKind

func (r *Resource) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns a schema.GroupVersionKind.

func (*Resource) NamespacedName

func (r *Resource) NamespacedName() string

NamespacedName returns a string of the form <namespace>/<name>.

type ResourceStatus

type ResourceStatus string

ResourceStatus defines the status of a resource.

Jump to

Keyboard shortcuts

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