v1beta1

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Overview

Package v1beta1 contains API Schema definitions for the addons v1beta1 API group +k8s:conversion-gen=sigs.k8s.io/cluster-api/api/addons/v1beta2 +kubebuilder:object:generate=true +groupName=addons.cluster.x-k8s.io

Deprecated: This package is deprecated and is going to be removed when support for v1beta1 will be dropped.

Index

Constants

View Source
const (
	// ResourcesAppliedV1Beta2Condition surfaces wether the resources in the ClusterResourceSet are applied to all matching clusters.
	// This indicates all resources exist, and no errors during applying them to all clusters.
	ResourcesAppliedV1Beta2Condition = "ResourcesApplied"

	// ResourcesAppliedV1beta2Reason is the reason used when all resources in the ClusterResourceSet object got applied
	// to all matching clusters.
	ResourcesAppliedV1beta2Reason = "Applied"

	// ResourcesNotAppliedV1Beta2Reason is the reason used when applying at least one of the resources to one of the matching clusters failed.
	ResourcesNotAppliedV1Beta2Reason = "NotApplied"

	// ResourcesAppliedWrongSecretTypeV1Beta2Reason is the reason used when the Secret's type in the resource list is not supported.
	ResourcesAppliedWrongSecretTypeV1Beta2Reason = "WrongSecretType"

	// ResourcesAppliedInternalErrorV1Beta2Reason surfaces unexpected failures when reconciling a ClusterResourceSet.
	ResourcesAppliedInternalErrorV1Beta2Reason = clusterv1beta1.InternalErrorV1Beta2Reason
)

ClusterResourceSet's ResourcesApplied condition and corresponding reasons that will be used in v1Beta2 API version.

View Source
const (
	// ClusterResourceSetSecretType is the only accepted type of secret in resources.
	ClusterResourceSetSecretType corev1.SecretType = "addons.cluster.x-k8s.io/resource-set" //nolint:gosec

	// ClusterResourceSetFinalizer is added to the ClusterResourceSet object for additional cleanup logic on deletion.
	ClusterResourceSetFinalizer = "addons.cluster.x-k8s.io"
)
View Source
const (
	// ResourcesAppliedCondition documents that all resources in the ClusterResourceSet object are applied to
	// all matching clusters. This indicates all resources exist, and no errors during applying them to all clusters.
	ResourcesAppliedCondition clusterv1beta1.ConditionType = "ResourcesApplied"

	// RemoteClusterClientFailedReason (Severity=Error) documents failure during getting the remote cluster client.
	RemoteClusterClientFailedReason = "RemoteClusterClientFailed"

	// ClusterMatchFailedReason (Severity=Warning) documents failure getting clusters that match the clusterSelector.
	ClusterMatchFailedReason = "ClusterMatchFailed"

	// ApplyFailedReason (Severity=Warning) documents applying at least one of the resources to one of the matching clusters is failed.
	ApplyFailedReason = "ApplyFailed"

	// RetrievingResourceFailedReason (Severity=Warning) documents at least one of the resources are not successfully retrieved.
	RetrievingResourceFailedReason = "RetrievingResourceFailed"

	// WrongSecretTypeReason (Severity=Warning) documents at least one of the Secret's type in the resource list is not supported.
	WrongSecretTypeReason = "WrongSecretType"
)

Conditions and condition Reasons for the ClusterResourceSet object.

View Source
const (
	// ClusterResourceSetResourceSetAppliedV1Beta2Condition documents that all resources in the ClusterResourceSet object
	// are applied to all matching clusters. This indicates all resources exist, and no errors during applying them to all clusters.
	ClusterResourceSetResourceSetAppliedV1Beta2Condition = "ResourceSetApplied"

	// ClusterResourceSetDeletingV1Beta2Condition surfaces details about ongoing deletion of the ClusterResourceSet.
	ClusterResourceSetDeletingV1Beta2Condition = clusterv1beta1.DeletingV1Beta2Condition
)

Conditions that will be used for the ClusterResourceSet object in v1Beta2 API version.

Variables

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

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

Functions

func Convert_Pointer_v1beta1_ResourceSetBinding_To_v1beta2_ResourceSetBinding added in v1.11.0

func Convert_Pointer_v1beta1_ResourceSetBinding_To_v1beta2_ResourceSetBinding(in **ResourceSetBinding, out *addonsv1.ResourceSetBinding, s apimachineryconversion.Scope) error

func Convert_v1_Condition_To_v1beta1_Condition added in v1.11.0

func Convert_v1_Condition_To_v1beta1_Condition(in *metav1.Condition, out *clusterv1beta1.Condition, s apimachineryconversion.Scope) error

func Convert_v1beta1_ClusterResourceSetBindingList_To_v1beta2_ClusterResourceSetBindingList added in v1.11.0

func Convert_v1beta1_ClusterResourceSetBindingList_To_v1beta2_ClusterResourceSetBindingList(in *ClusterResourceSetBindingList, out *v1beta2.ClusterResourceSetBindingList, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSetBindingList_To_v1beta2_ClusterResourceSetBindingList is an autogenerated conversion function.

func Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1beta2_ClusterResourceSetBindingSpec added in v1.11.0

func Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1beta2_ClusterResourceSetBindingSpec(in *ClusterResourceSetBindingSpec, out *v1beta2.ClusterResourceSetBindingSpec, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSetBindingSpec_To_v1beta2_ClusterResourceSetBindingSpec is an autogenerated conversion function.

func Convert_v1beta1_ClusterResourceSetBinding_To_v1beta2_ClusterResourceSetBinding added in v1.11.0

func Convert_v1beta1_ClusterResourceSetBinding_To_v1beta2_ClusterResourceSetBinding(in *ClusterResourceSetBinding, out *v1beta2.ClusterResourceSetBinding, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSetBinding_To_v1beta2_ClusterResourceSetBinding is an autogenerated conversion function.

func Convert_v1beta1_ClusterResourceSetList_To_v1beta2_ClusterResourceSetList added in v1.11.0

func Convert_v1beta1_ClusterResourceSetList_To_v1beta2_ClusterResourceSetList(in *ClusterResourceSetList, out *v1beta2.ClusterResourceSetList, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSetList_To_v1beta2_ClusterResourceSetList is an autogenerated conversion function.

func Convert_v1beta1_ClusterResourceSetSpec_To_v1beta2_ClusterResourceSetSpec added in v1.11.0

func Convert_v1beta1_ClusterResourceSetSpec_To_v1beta2_ClusterResourceSetSpec(in *ClusterResourceSetSpec, out *v1beta2.ClusterResourceSetSpec, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSetSpec_To_v1beta2_ClusterResourceSetSpec is an autogenerated conversion function.

func Convert_v1beta1_ClusterResourceSetStatus_To_v1beta2_ClusterResourceSetStatus added in v1.11.0

func Convert_v1beta1_ClusterResourceSetStatus_To_v1beta2_ClusterResourceSetStatus(in *ClusterResourceSetStatus, out *addonsv1.ClusterResourceSetStatus, s apimachineryconversion.Scope) error

func Convert_v1beta1_ClusterResourceSet_To_v1beta2_ClusterResourceSet added in v1.11.0

func Convert_v1beta1_ClusterResourceSet_To_v1beta2_ClusterResourceSet(in *ClusterResourceSet, out *v1beta2.ClusterResourceSet, s conversion.Scope) error

Convert_v1beta1_ClusterResourceSet_To_v1beta2_ClusterResourceSet is an autogenerated conversion function.

func Convert_v1beta1_Condition_To_v1_Condition added in v1.11.0

func Convert_v1beta1_Condition_To_v1_Condition(in *clusterv1beta1.Condition, out *metav1.Condition, s apimachineryconversion.Scope) error

func Convert_v1beta1_ResourceBinding_To_v1beta2_ResourceBinding added in v1.11.0

func Convert_v1beta1_ResourceBinding_To_v1beta2_ResourceBinding(in *ResourceBinding, out *addonsv1.ResourceBinding, s apimachineryconversion.Scope) error

func Convert_v1beta1_ResourceRef_To_v1beta2_ResourceRef added in v1.11.0

func Convert_v1beta1_ResourceRef_To_v1beta2_ResourceRef(in *ResourceRef, out *v1beta2.ResourceRef, s conversion.Scope) error

Convert_v1beta1_ResourceRef_To_v1beta2_ResourceRef is an autogenerated conversion function.

func Convert_v1beta1_ResourceSetBinding_To_v1beta2_ResourceSetBinding added in v1.11.0

func Convert_v1beta1_ResourceSetBinding_To_v1beta2_ResourceSetBinding(in *ResourceSetBinding, out *v1beta2.ResourceSetBinding, s conversion.Scope) error

Convert_v1beta1_ResourceSetBinding_To_v1beta2_ResourceSetBinding is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList added in v1.11.0

func Convert_v1beta2_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList(in *v1beta2.ClusterResourceSetBindingList, out *ClusterResourceSetBindingList, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSetBindingList_To_v1beta1_ClusterResourceSetBindingList is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec added in v1.11.0

func Convert_v1beta2_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec(in *v1beta2.ClusterResourceSetBindingSpec, out *ClusterResourceSetBindingSpec, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSetBindingSpec_To_v1beta1_ClusterResourceSetBindingSpec is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding added in v1.11.0

func Convert_v1beta2_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding(in *v1beta2.ClusterResourceSetBinding, out *ClusterResourceSetBinding, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSetBinding_To_v1beta1_ClusterResourceSetBinding is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList added in v1.11.0

func Convert_v1beta2_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList(in *v1beta2.ClusterResourceSetList, out *ClusterResourceSetList, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSetList_To_v1beta1_ClusterResourceSetList is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec added in v1.11.0

func Convert_v1beta2_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec(in *v1beta2.ClusterResourceSetSpec, out *ClusterResourceSetSpec, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSetSpec_To_v1beta1_ClusterResourceSetSpec is an autogenerated conversion function.

func Convert_v1beta2_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus added in v1.11.0

func Convert_v1beta2_ClusterResourceSetStatus_To_v1beta1_ClusterResourceSetStatus(in *addonsv1.ClusterResourceSetStatus, out *ClusterResourceSetStatus, s apimachineryconversion.Scope) error

func Convert_v1beta2_ClusterResourceSet_To_v1beta1_ClusterResourceSet added in v1.11.0

func Convert_v1beta2_ClusterResourceSet_To_v1beta1_ClusterResourceSet(in *v1beta2.ClusterResourceSet, out *ClusterResourceSet, s conversion.Scope) error

Convert_v1beta2_ClusterResourceSet_To_v1beta1_ClusterResourceSet is an autogenerated conversion function.

func Convert_v1beta2_ResourceBinding_To_v1beta1_ResourceBinding added in v1.11.0

func Convert_v1beta2_ResourceBinding_To_v1beta1_ResourceBinding(in *addonsv1.ResourceBinding, out *ResourceBinding, s apimachineryconversion.Scope) error

func Convert_v1beta2_ResourceRef_To_v1beta1_ResourceRef added in v1.11.0

func Convert_v1beta2_ResourceRef_To_v1beta1_ResourceRef(in *v1beta2.ResourceRef, out *ResourceRef, s conversion.Scope) error

Convert_v1beta2_ResourceRef_To_v1beta1_ResourceRef is an autogenerated conversion function.

func Convert_v1beta2_ResourceSetBinding_To_Pointer_v1beta1_ResourceSetBinding added in v1.11.0

func Convert_v1beta2_ResourceSetBinding_To_Pointer_v1beta1_ResourceSetBinding(in *addonsv1.ResourceSetBinding, out **ResourceSetBinding, s apimachineryconversion.Scope) error

func Convert_v1beta2_ResourceSetBinding_To_v1beta1_ResourceSetBinding added in v1.11.0

func Convert_v1beta2_ResourceSetBinding_To_v1beta1_ResourceSetBinding(in *v1beta2.ResourceSetBinding, out *ResourceSetBinding, s conversion.Scope) error

Convert_v1beta2_ResourceSetBinding_To_v1beta1_ResourceSetBinding is an autogenerated conversion function.

func RegisterConversions added in v1.11.0

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

Types

type ClusterResourceSet

type ClusterResourceSet struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec is the desired state of ClusterResourceSet.
	// +optional
	Spec ClusterResourceSetSpec `json:"spec,omitempty"`
	// status is the observed state of ClusterResourceSet.
	// +optional
	Status ClusterResourceSetStatus `json:"status,omitempty"`
}

ClusterResourceSet is the Schema for the clusterresourcesets API. For advanced use cases an add-on provider should be used instead.

func (*ClusterResourceSet) ConvertFrom added in v1.11.0

func (dst *ClusterResourceSet) ConvertFrom(srcRaw conversion.Hub) error

func (*ClusterResourceSet) ConvertTo added in v1.11.0

func (src *ClusterResourceSet) ConvertTo(dstRaw conversion.Hub) error

func (*ClusterResourceSet) DeepCopy

func (in *ClusterResourceSet) DeepCopy() *ClusterResourceSet

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

func (*ClusterResourceSet) DeepCopyInto

func (in *ClusterResourceSet) DeepCopyInto(out *ClusterResourceSet)

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

func (*ClusterResourceSet) DeepCopyObject

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

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

func (*ClusterResourceSet) GetConditions

func (m *ClusterResourceSet) GetConditions() clusterv1beta1.Conditions

GetConditions returns the set of conditions for this object.

func (*ClusterResourceSet) GetV1Beta2Conditions

func (m *ClusterResourceSet) GetV1Beta2Conditions() []metav1.Condition

GetV1Beta2Conditions returns the set of conditions for this object.

func (*ClusterResourceSet) SetConditions

func (m *ClusterResourceSet) SetConditions(conditions clusterv1beta1.Conditions)

SetConditions sets the conditions on this object.

func (*ClusterResourceSet) SetV1Beta2Conditions

func (m *ClusterResourceSet) SetV1Beta2Conditions(conditions []metav1.Condition)

SetV1Beta2Conditions sets conditions for an API object.

type ClusterResourceSetBinding

type ClusterResourceSetBinding struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// spec is the desired state of ClusterResourceSetBinding.
	// +optional
	Spec ClusterResourceSetBindingSpec `json:"spec,omitempty"`
}

ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to.

func (*ClusterResourceSetBinding) ConvertFrom added in v1.11.0

func (dst *ClusterResourceSetBinding) ConvertFrom(srcRaw conversion.Hub) error

func (*ClusterResourceSetBinding) ConvertTo added in v1.11.0

func (src *ClusterResourceSetBinding) ConvertTo(dstRaw conversion.Hub) error

func (*ClusterResourceSetBinding) DeepCopy

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

func (*ClusterResourceSetBinding) DeepCopyInto

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

func (*ClusterResourceSetBinding) DeepCopyObject

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

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

func (*ClusterResourceSetBinding) DeleteBinding deprecated

func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterResourceSet)

DeleteBinding removes the ClusterResourceSet from the ClusterResourceSetBinding Bindings list.

Deprecated: This function is deprecated and will be removed in an upcoming release of Cluster API.

func (*ClusterResourceSetBinding) GetOrCreateBinding

func (c *ClusterResourceSetBinding) GetOrCreateBinding(clusterResourceSet *ClusterResourceSet) *ResourceSetBinding

GetOrCreateBinding returns the ResourceSetBinding for a given ClusterResourceSet if exists, otherwise creates one and updates ClusterResourceSet with it.

func (*ClusterResourceSetBinding) RemoveBinding

func (c *ClusterResourceSetBinding) RemoveBinding(clusterResourceSet *ClusterResourceSet)

RemoveBinding removes the ClusterResourceSet from the ClusterResourceSetBinding Bindings list.

type ClusterResourceSetBindingList

type ClusterResourceSetBindingList struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// items is the list of ClusterResourceSetBindings.
	Items []ClusterResourceSetBinding `json:"items"`
}

ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding.

func (*ClusterResourceSetBindingList) DeepCopy

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

func (*ClusterResourceSetBindingList) DeepCopyInto

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

func (*ClusterResourceSetBindingList) DeepCopyObject

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

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

type ClusterResourceSetBindingSpec

type ClusterResourceSetBindingSpec struct {
	// bindings is a list of ClusterResourceSets and their resources.
	// +optional
	// +kubebuilder:validation:MaxItems=100
	Bindings []*ResourceSetBinding `json:"bindings,omitempty"`

	// clusterName is the name of the Cluster this binding applies to.
	// Note: this field mandatory in v1beta2.
	// +optional
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	ClusterName string `json:"clusterName,omitempty"`
}

ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding.

func (*ClusterResourceSetBindingSpec) DeepCopy

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

func (*ClusterResourceSetBindingSpec) DeepCopyInto

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

type ClusterResourceSetList

type ClusterResourceSetList struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is the standard list's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// items is the list of ClusterResourceSets.
	Items []ClusterResourceSet `json:"items"`
}

ClusterResourceSetList contains a list of ClusterResourceSet.

func (*ClusterResourceSetList) DeepCopy

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

func (*ClusterResourceSetList) DeepCopyInto

func (in *ClusterResourceSetList) DeepCopyInto(out *ClusterResourceSetList)

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

func (*ClusterResourceSetList) DeepCopyObject

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

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

type ClusterResourceSetResourceKind

type ClusterResourceSetResourceKind string

ClusterResourceSetResourceKind is a string representation of a ClusterResourceSet resource kind.

const (
	SecretClusterResourceSetResourceKind    ClusterResourceSetResourceKind = "Secret"
	ConfigMapClusterResourceSetResourceKind ClusterResourceSetResourceKind = "ConfigMap"
)

Define the ClusterResourceSetResourceKind constants.

type ClusterResourceSetSpec

type ClusterResourceSetSpec struct {
	// clusterSelector is the label selector for Clusters. The Clusters that are
	// selected by this will be the ones affected by this ClusterResourceSet.
	// It must match the Cluster labels. This field is immutable.
	// Label selector cannot be empty.
	// +required
	ClusterSelector metav1.LabelSelector `json:"clusterSelector"`

	// resources is a list of Secrets/ConfigMaps where each contains 1 or more resources to be applied to remote clusters.
	// +optional
	// +kubebuilder:validation:MaxItems=100
	Resources []ResourceRef `json:"resources,omitempty"`

	// strategy is the strategy to be used during applying resources. Defaults to ApplyOnce. This field is immutable.
	// +kubebuilder:validation:Enum=ApplyOnce;Reconcile
	// +optional
	Strategy string `json:"strategy,omitempty"`
}

ClusterResourceSetSpec defines the desired state of ClusterResourceSet.

func (*ClusterResourceSetSpec) DeepCopy

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

func (*ClusterResourceSetSpec) DeepCopyInto

func (in *ClusterResourceSetSpec) DeepCopyInto(out *ClusterResourceSetSpec)

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

func (*ClusterResourceSetSpec) SetTypedStrategy

func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy)

SetTypedStrategy sets the Strategy field to the string representation of ClusterResourceSetStrategy.

type ClusterResourceSetStatus

type ClusterResourceSetStatus struct {
	// observedGeneration reflects the generation of the most recently observed ClusterResourceSet.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// conditions defines current state of the ClusterResourceSet.
	// +optional
	Conditions clusterv1beta1.Conditions `json:"conditions,omitempty"`

	// v1beta2 groups all the fields that will be added or modified in ClusterResourceSet's status with the V1Beta2 version.
	// +optional
	V1Beta2 *ClusterResourceSetV1Beta2Status `json:"v1beta2,omitempty"`
}

ClusterResourceSetStatus defines the observed state of ClusterResourceSet.

func (*ClusterResourceSetStatus) DeepCopy

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

func (*ClusterResourceSetStatus) DeepCopyInto

func (in *ClusterResourceSetStatus) DeepCopyInto(out *ClusterResourceSetStatus)

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

type ClusterResourceSetStrategy

type ClusterResourceSetStrategy string

ClusterResourceSetStrategy is a string representation of a ClusterResourceSet Strategy.

const (
	// ClusterResourceSetStrategyApplyOnce is the default strategy a ClusterResourceSet strategy is assigned by
	// ClusterResourceSet controller after being created if not specified by user.
	ClusterResourceSetStrategyApplyOnce ClusterResourceSetStrategy = "ApplyOnce"
	// ClusterResourceSetStrategyReconcile reapplies the resources managed by a ClusterResourceSet
	// if their normalized hash changes.
	ClusterResourceSetStrategyReconcile ClusterResourceSetStrategy = "Reconcile"
)

type ClusterResourceSetV1Beta2Status

type ClusterResourceSetV1Beta2Status struct {
	// conditions represents the observations of a ClusterResourceSet's current state.
	// Known condition types are ResourceSetApplied, Deleting.
	// +optional
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=32
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ClusterResourceSetV1Beta2Status groups all the fields that will be added or modified in ClusterResourceSet with the V1Beta2 version. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.

func (*ClusterResourceSetV1Beta2Status) DeepCopy

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

func (*ClusterResourceSetV1Beta2Status) DeepCopyInto

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

type ResourceBinding

type ResourceBinding struct {
	// ResourceRef specifies a resource.
	ResourceRef `json:",inline"`

	// hash is the hash of a resource's data. This can be used to decide if a resource is changed.
	// For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change.
	// +optional
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=256
	Hash string `json:"hash,omitempty"`

	// lastAppliedTime identifies when this resource was last applied to the cluster.
	// +optional
	LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"`

	// applied is to track if a resource is applied to the cluster or not.
	// +required
	Applied bool `json:"applied"`
}

ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.

func (*ResourceBinding) DeepCopy

func (in *ResourceBinding) DeepCopy() *ResourceBinding

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

func (*ResourceBinding) DeepCopyInto

func (in *ResourceBinding) DeepCopyInto(out *ResourceBinding)

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

type ResourceRef

type ResourceRef struct {
	// name of the resource that is in the same namespace with ClusterResourceSet object.
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	Name string `json:"name"`

	// kind of the resource. Supported kinds are: Secrets and ConfigMaps.
	// +kubebuilder:validation:Enum=Secret;ConfigMap
	// +required
	Kind string `json:"kind"`
}

ResourceRef specifies a resource.

func (*ResourceRef) DeepCopy

func (in *ResourceRef) DeepCopy() *ResourceRef

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

func (*ResourceRef) DeepCopyInto

func (in *ResourceRef) DeepCopyInto(out *ResourceRef)

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

type ResourceSetBinding

type ResourceSetBinding struct {
	// clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	ClusterResourceSetName string `json:"clusterResourceSetName"`

	// resources is a list of resources that the ClusterResourceSet has.
	// +optional
	// +kubebuilder:validation:MaxItems=100
	Resources []ResourceBinding `json:"resources,omitempty"`
}

ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.

func (*ResourceSetBinding) DeepCopy

func (in *ResourceSetBinding) DeepCopy() *ResourceSetBinding

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

func (*ResourceSetBinding) DeepCopyInto

func (in *ResourceSetBinding) DeepCopyInto(out *ResourceSetBinding)

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

func (*ResourceSetBinding) GetResource

func (r *ResourceSetBinding) GetResource(resourceRef ResourceRef) *ResourceBinding

GetResource returns a ResourceBinding for a resource ref if present.

func (*ResourceSetBinding) IsApplied

func (r *ResourceSetBinding) IsApplied(resourceRef ResourceRef) bool

IsApplied returns true if the resource is applied to the cluster by checking the cluster's binding.

func (*ResourceSetBinding) SetBinding

func (r *ResourceSetBinding) SetBinding(resourceBinding ResourceBinding)

SetBinding sets resourceBinding for a resource in ResourceSetBinding either by updating the existing one or creating a new one.

Jump to

Keyboard shortcuts

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