Documentation ¶
Overview ¶
Package v1alpha4 contains API Schema definitions for the addons v1alpha4 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) Default()
- func (m *ClusterResourceSet) GetConditions() clusterv1.Conditions
- func (m *ClusterResourceSet) SetConditions(conditions clusterv1.Conditions)
- func (m *ClusterResourceSet) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (m *ClusterResourceSet) ValidateCreate() error
- func (m *ClusterResourceSet) ValidateDelete() error
- func (m *ClusterResourceSet) ValidateUpdate(old runtime.Object) error
- 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)
- func (c *ClusterResourceSetBinding) GetOrCreateBinding(clusterResourceSet *ClusterResourceSet) *ResourceSetBinding
- type ClusterResourceSetBindingList
- type ClusterResourceSetBindingSpec
- type ClusterResourceSetList
- type ClusterResourceSetResourceKind
- type ClusterResourceSetSpec
- type ClusterResourceSetStatus
- type ClusterResourceSetStrategy
- type ResourceBinding
- type ResourceRef
- type ResourceSetBinding
Constants ¶
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" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "addons.cluster.x-k8s.io", Version: "v1alpha4"} // 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 )
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) Default ¶
func (m *ClusterResourceSet) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type.
func (*ClusterResourceSet) GetConditions ¶
func (m *ClusterResourceSet) GetConditions() clusterv1.Conditions
GetConditions 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) SetupWebhookWithManager ¶
func (m *ClusterResourceSet) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ClusterResourceSet) ValidateCreate ¶
func (m *ClusterResourceSet) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type.
func (*ClusterResourceSet) ValidateDelete ¶
func (m *ClusterResourceSet) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type.
func (*ClusterResourceSet) ValidateUpdate ¶
func (m *ClusterResourceSet) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
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 ¶
func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterResourceSet)
DeleteBinding removes the ClusterResourceSet from the ClusterResourceSetBinding Bindings list.
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.
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. Bindings []*ResourceSetBinding `json:"bindings,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. 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 // +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"` }
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" )
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. 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. 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) 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.