Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the addons v1beta1 API group +kubebuilder:object:generate=true +groupName=addons.cluster.x-k8s.io
Index ¶
- Constants
- Variables
- type ClusterResourceSet
- func (in *ClusterResourceSet) DeepCopy() *ClusterResourceSet
- func (in *ClusterResourceSet) DeepCopyInto(out *ClusterResourceSet)
- func (in *ClusterResourceSet) DeepCopyObject() runtime.Object
- func (m *ClusterResourceSet) GetConditions() clusterv1.Conditions
- func (m *ClusterResourceSet) GetV1Beta2Conditions() []metav1.Condition
- func (*ClusterResourceSet) Hub()
- func (m *ClusterResourceSet) SetConditions(conditions clusterv1.Conditions)
- func (m *ClusterResourceSet) SetV1Beta2Conditions(conditions []metav1.Condition)
- type ClusterResourceSetBinding
- func (in *ClusterResourceSetBinding) DeepCopy() *ClusterResourceSetBinding
- func (in *ClusterResourceSetBinding) DeepCopyInto(out *ClusterResourceSetBinding)
- func (in *ClusterResourceSetBinding) DeepCopyObject() runtime.Object
- func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterResourceSet)deprecated
- func (c *ClusterResourceSetBinding) GetOrCreateBinding(clusterResourceSet *ClusterResourceSet) *ResourceSetBinding
- func (*ClusterResourceSetBinding) Hub()
- func (c *ClusterResourceSetBinding) RemoveBinding(clusterResourceSet *ClusterResourceSet)
- type ClusterResourceSetBindingList
- type ClusterResourceSetBindingSpec
- type ClusterResourceSetList
- type ClusterResourceSetResourceKind
- type ClusterResourceSetSpec
- type ClusterResourceSetStatus
- type ClusterResourceSetStrategy
- type ClusterResourceSetV1Beta2Status
- type ResourceBinding
- type ResourceRef
- type ResourceSetBinding
- func (in *ResourceSetBinding) DeepCopy() *ResourceSetBinding
- func (in *ResourceSetBinding) DeepCopyInto(out *ResourceSetBinding)
- func (r *ResourceSetBinding) GetResource(resourceRef ResourceRef) *ResourceBinding
- func (r *ResourceSetBinding) IsApplied(resourceRef ResourceRef) bool
- func (r *ResourceSetBinding) SetBinding(resourceBinding ResourceBinding)
Constants ¶
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 = clusterv1.InternalErrorV1Beta2Reason
)
ClusterResourceSet's ResourcesApplied condition and corresponding reasons that will be used in v1Beta2 API version.
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"
)
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 clusterv1.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"
)
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 = clusterv1.DeletingV1Beta2Condition
)
Conditions that will be used for the ClusterResourceSet object in v1Beta2 API version.
Variables ¶
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 ¶
This section is empty.
Types ¶
type ClusterResourceSet ¶
type ClusterResourceSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterResourceSetSpec `json:"spec,omitempty"`
Status ClusterResourceSetStatus `json:"status,omitempty"`
}
ClusterResourceSet is the Schema for the clusterresourcesets API.
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() clusterv1.Conditions
GetConditions returns the set of conditions for this object.
func (*ClusterResourceSet) GetV1Beta2Conditions ¶ added in v1.9.0
func (m *ClusterResourceSet) GetV1Beta2Conditions() []metav1.Condition
GetV1Beta2Conditions returns the set of conditions for this object.
func (*ClusterResourceSet) SetConditions ¶
func (m *ClusterResourceSet) SetConditions(conditions clusterv1.Conditions)
SetConditions sets the conditions on this object.
func (*ClusterResourceSet) SetV1Beta2Conditions ¶ added in v1.9.0
func (m *ClusterResourceSet) SetV1Beta2Conditions(conditions []metav1.Condition)
SetV1Beta2Conditions sets conditions for an API object.
type ClusterResourceSetBinding ¶
type ClusterResourceSetBinding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterResourceSetBindingSpec `json:"spec,omitempty"`
}
ClusterResourceSetBinding lists all matching ClusterResourceSets with the cluster it belongs to.
func (*ClusterResourceSetBinding) DeepCopy ¶
func (in *ClusterResourceSetBinding) DeepCopy() *ClusterResourceSetBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBinding.
func (*ClusterResourceSetBinding) DeepCopyInto ¶
func (in *ClusterResourceSetBinding) DeepCopyInto(out *ClusterResourceSetBinding)
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 ¶ added in v1.6.0
func (c *ClusterResourceSetBinding) RemoveBinding(clusterResourceSet *ClusterResourceSet)
RemoveBinding removes the ClusterResourceSet from the ClusterResourceSetBinding Bindings list.
type ClusterResourceSetBindingList ¶
type ClusterResourceSetBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterResourceSetBinding `json:"items"`
}
ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding.
func (*ClusterResourceSetBindingList) DeepCopy ¶
func (in *ClusterResourceSetBindingList) DeepCopy() *ClusterResourceSetBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBindingList.
func (*ClusterResourceSetBindingList) DeepCopyInto ¶
func (in *ClusterResourceSetBindingList) DeepCopyInto(out *ClusterResourceSetBindingList)
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
Bindings []*ResourceSetBinding `json:"bindings,omitempty"`
// clusterName is the name of the Cluster this binding applies to.
// Note: this field mandatory in v1beta2.
// +optional
ClusterName string `json:"clusterName,omitempty"`
}
ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding.
func (*ClusterResourceSetBindingSpec) DeepCopy ¶
func (in *ClusterResourceSetBindingSpec) DeepCopy() *ClusterResourceSetBindingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetBindingSpec.
func (*ClusterResourceSetBindingSpec) DeepCopyInto ¶
func (in *ClusterResourceSetBindingSpec) DeepCopyInto(out *ClusterResourceSetBindingSpec)
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"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterResourceSet `json:"items"`
}
ClusterResourceSetList contains a list of ClusterResourceSet.
func (*ClusterResourceSetList) DeepCopy ¶
func (in *ClusterResourceSetList) DeepCopy() *ClusterResourceSetList
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 {
// 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.
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
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 ¶
func (in *ClusterResourceSetSpec) DeepCopy() *ClusterResourceSetSpec
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 clusterv1.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 ¶
func (in *ClusterResourceSetStatus) DeepCopy() *ClusterResourceSetStatus
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 ¶ added in v1.9.0
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 ¶ added in v1.9.0
func (in *ClusterResourceSetV1Beta2Status) DeepCopy() *ClusterResourceSetV1Beta2Status
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceSetV1Beta2Status.
func (*ClusterResourceSetV1Beta2Status) DeepCopyInto ¶ added in v1.9.0
func (in *ClusterResourceSetV1Beta2Status) DeepCopyInto(out *ClusterResourceSetV1Beta2Status)
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
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.
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.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// kind of the resource. Supported kinds are: Secrets and ConfigMaps.
// +kubebuilder:validation:Enum=Secret;ConfigMap
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.
ClusterResourceSetName string `json:"clusterResourceSetName"`
// resources is a list of resources that the ClusterResourceSet has.
// +optional
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 ¶ added in v1.4.0
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.