v1alpha1

package
v0.1.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: Apache-2.0 Imports: 22 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 (
	// StageAnnotationValueCreated signifies the stage annotation created.
	StageAnnotationValueCreated = StageAnnotationValue("created")
	// StageAnnotationValueUpgraded signifies the stage annotation upgraded.
	StageAnnotationValueUpgraded = StageAnnotationValue("upgraded")
)
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 (
	// EvaluatedCELCondition reports on whether the CEL expression is evaluated properly.
	EvaluatedCELCondition clusterv1.ConditionType = "EvaluatedCEL"

	// FailedToEvaluatePreConditionReason is used when some pre CEL expression have been failed to evaluate.
	FailedToEvaluatePreConditionReason = "FailedToEvaluatePreCondition"

	// FailedToEvaluatePostConditionReason is used when some post CEL expression have been failed to evaluate.
	FailedToEvaluatePostConditionReason = "FailedToEvaluatePostCondition"
)
View Source
const (
	// HelmChartFoundCondition reports when mentioned helm chart is present in the cluster addon tar archive.
	HelmChartFoundCondition clusterv1.ConditionType = "HelmChartFound"

	// HelmChartMissingReason is used when mentioned helm chart is missing in the cluster addon tar archive.
	HelmChartMissingReason = "HelmChartMissing"
)
View Source
const (
	// HelmChartTemplatedCondition reports on whether the relevant helm chart has been templated properly.
	HelmChartTemplatedCondition clusterv1.ConditionType = "HelmChartTemplated"

	// TemplateOldClusterStackOverwriteFailedReason is used when old cluster stack overwrite.yaml is wrong.
	TemplateOldClusterStackOverwriteFailedReason = "TemplateOldClusterStackOverwriteFailed"

	// TemplateOldClusterStackFailedReason is used when there is a issue doing helm template for the old cluster stack.
	TemplateOldClusterStackFailedReason = "TemplateOldClusterStackFailed"

	// TemplateNewClusterStackOverwriteFailedReason is used when new cluster stack overwrite.yaml is wrong.
	TemplateNewClusterStackOverwriteFailedReason = "TemplateNewClusterStackOverwriteFailed"

	// TemplateNewClusterStackFailedReason is used when there is a issue doing helm template for the new cluster stack.
	TemplateNewClusterStackFailedReason = "TemplateNewClusterStackFailed"
)
View Source
const (
	// ClusterAddonConfigValidatedCondition reports when there is a error parsing clusteraddon.yaml.
	ClusterAddonConfigValidatedCondition clusterv1.ConditionType = "ClusterAddonConfigValidated"

	// ParsingClusterAddonConfigFailedReason is used when there's some error happen while parsing clusteraddon.yaml.
	ParsingClusterAddonConfigFailedReason = "ParsingClusterAddonConfigFailed"
)
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 (
	// HookServerReadyCondition reports on whether hook server is ready or not.
	HookServerReadyCondition clusterv1.ConditionType = "HookServerReady"

	// HookServerUnresponsiveReason is used when hook server don't update the clusterAddon.Spec.Hook.
	HookServerUnresponsiveReason = "HookServerUnresponsive"
)
View Source
const (
	// HelmChartDeletedCondition reports on whether the relevant helm chart has been applied.
	HelmChartDeletedCondition clusterv1.ConditionType = "HelmChartDeleted"

	// FailedToDeleteObjectsReason is used when some objects have been failed to delete.
	FailedToDeleteObjectsReason = "FailedToDeleteObjects"
)
View Source
const (
	// ProviderClusterStackReleasesSyncedCondition reports on whether the ProviderClusterStackReleases are ready.
	ProviderClusterStackReleasesSyncedCondition clusterv1.ConditionType = "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 (
	// AssetsClientAPIAvailableCondition is used when AssetsClient API is available.
	AssetsClientAPIAvailableCondition clusterv1.ConditionType = "AssetsClientAPIAvailable"

	// FailedCreateAssetsClientReason is used when user don't specify the token or environment variable required for initializing the assets client.
	FailedCreateAssetsClientReason = "FailedCreateAssetsClient" //#nosec
)
View Source
const (
	// ReleasesSyncedCondition is used when releases have been synced successfully.
	ReleasesSyncedCondition clusterv1.ConditionType = "ReleasesSynced"

	// FailedToSyncReason is used when 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 clusterv1.ConditionType = "ClusterStackReleasesSynced" //#nosec
)
View Source
const StageAnnotation = "ClusterAddonStage"

StageAnnotation is the annotation name and key for the stage annotation.

Variables

View Source
var (
	// StagePhaseNone signifies the empty stage phase.
	StagePhaseNone = StagePhase("")
	// StagePhasePending signifies the stage phase 'pending'.
	StagePhasePending = StagePhase("Pending")
	// StagePhaseWaitingForPreCondition signifies the stage phase 'waitingForPreCondition'.
	StagePhaseWaitingForPreCondition = StagePhase("waitingForPreCondition")
	// StagePhaseApplyingOrDeleting signifies the stage phase 'applyingOrDeleting'.
	StagePhaseApplyingOrDeleting = StagePhase("applyingOrDeleting")
	// StagePhaseWaitingForPostCondition signifies the stage phase 'waitingForPostCondition'.
	StagePhaseWaitingForPostCondition = StagePhase("waitingForPostCondition")
	// StagePhaseDone signifies the stage phase 'done'.
	StagePhaseDone = StagePhase("done")
)
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 Cluster

type Cluster struct {
	Client client.Client
}

Cluster implements a validating and defaulting webhook for Cluster. +k8s:deepcopy-gen=false

func (*Cluster) SetupWebhookWithManager

func (r *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterStack.

func (*Cluster) ValidateCreate

func (r *Cluster) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*Cluster) ValidateDelete

func (*Cluster) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*Cluster) ValidateUpdate

func (r *Cluster) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

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) GetStagePhase

func (r *ClusterAddon) GetStagePhase(stageName string, action clusteraddon.Action) StagePhase

GetStagePhase returns helm chart status for the helm chart.

func (*ClusterAddon) HasStageAnnotation

func (r *ClusterAddon) HasStageAnnotation(value StageAnnotationValue) bool

HasStageAnnotation returns whether the stage annotation exists with a certain value.

func (*ClusterAddon) SetConditions

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

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

func (*ClusterAddon) SetStageAnnotations

func (r *ClusterAddon) SetStageAnnotations(value StageAnnotationValue)

SetStageAnnotations sets the annotation whether the cluster got created or upgraded.

func (*ClusterAddon) SetStagePhase

func (r *ClusterAddon) SetStagePhase(stageName string, action clusteraddon.Action, phase StagePhase)

SetStagePhase sets the helm chart status phase.

func (*ClusterAddon) SetupWebhookWithManager

func (r *ClusterAddon) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterAddon.

func (*ClusterAddon) ValidateCreate

func (r *ClusterAddon) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterAddon) ValidateDelete

func (*ClusterAddon) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterAddon) ValidateUpdate

func (r *ClusterAddon) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

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.

func (*ClusterAddonList) SetupWebhookWithManager

func (r *ClusterAddonList) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterAddonList.

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"`

	// Hook specifies the runtime hook for the Cluster event.
	// +optional
	Hook string `json:"hook,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"`

	// Stages shows the state of all stages in the current running hook.
	// +optional
	Stages []StageStatus `json:"stages,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.

func (*ClusterStackList) SetupWebhookWithManager

func (r *ClusterStackList) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterStackList.

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.

func (*ClusterStackReleaseList) SetupWebhookWithManager

func (r *ClusterStackReleaseList) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterStackReleaseList.

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 ClusterStackReleaseWebhook

type ClusterStackReleaseWebhook struct {
	client.Client
}

ClusterStackReleaseWebhook implements validating and defaulting webhook for ClusterStackRelease. +k8s:deepcopy-gen=false

func (*ClusterStackReleaseWebhook) SetupWebhookWithManager

func (r *ClusterStackReleaseWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterStackRelease.

func (*ClusterStackReleaseWebhook) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterStackReleaseWebhook) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterStackReleaseWebhook) ValidateUpdate

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

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 ClusterStackWebhook

type ClusterStackWebhook struct {
	LocalMode bool
	client.Client
}

ClusterStackWebhook implements validating and defaulting webhook for clusterstack. +k8s:deepcopy-gen=false

func (*ClusterStackWebhook) SetupWebhookWithManager

func (r *ClusterStackWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager initializes webhook manager for ClusterStack.

func (*ClusterStackWebhook) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterStackWebhook) ValidateDelete

func (r *ClusterStackWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*ClusterStackWebhook) ValidateUpdate

func (r *ClusterStackWebhook) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

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.

type StageAnnotationValue

type StageAnnotationValue string

StageAnnotationValue is the value of the stage annotation.

type StagePhase

type StagePhase string

StagePhase defines the status of helm chart in the cluster addon.

type StageStatus

type StageStatus struct {
	// Name represent name of the helm chart
	// +optional
	Name string `json:"name"`

	// Action is the action of the helm chart. e.g. - apply and delete.
	// +optional
	Action clusteraddon.Action `json:"action,omitempty"`

	// Phase is the current phase of the helm chart.
	// +optional
	Phase StagePhase `json:"phase"`
}

StageStatus represents the helm charts of the hook and it's phases.

func (*StageStatus) DeepCopy

func (in *StageStatus) DeepCopy() *StageStatus

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

func (*StageStatus) DeepCopyInto

func (in *StageStatus) DeepCopyInto(out *StageStatus)

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