Documentation ¶
Overview ¶
+kubebuilder:validation:Optional +groupName=cluster.open-cluster-management.io
Index ¶
- Constants
- Variables
- func BuildClusterSelector(clusterSet *ManagedClusterSet) (labels.Selector, error)
- func GetClustersFromClusterSet(clusterSet *ManagedClusterSet, clustersGetter ManagedClustersGetter) ([]*v1.ManagedCluster, error)
- func Resource(resource string) schema.GroupResource
- type ManagedClusterSelector
- type ManagedClusterSet
- type ManagedClusterSetBinding
- type ManagedClusterSetBindingList
- func (in *ManagedClusterSetBindingList) DeepCopy() *ManagedClusterSetBindingList
- func (in *ManagedClusterSetBindingList) DeepCopyInto(out *ManagedClusterSetBindingList)
- func (in *ManagedClusterSetBindingList) DeepCopyObject() runtime.Object
- func (ManagedClusterSetBindingList) SwaggerDoc() map[string]string
- type ManagedClusterSetBindingSpec
- type ManagedClusterSetBindingStatus
- type ManagedClusterSetBindingsGetter
- type ManagedClusterSetList
- type ManagedClusterSetSpec
- type ManagedClusterSetStatus
- type ManagedClusterSetsGetter
- type ManagedClustersGetter
- type SelectorType
Constants ¶
const ( // ClusterSetBindingBoundType is a condition type of clustersetbinding representing // whether the ClusterSetBinding is bound to a clusterset. ClusterSetBindingBoundType = "Bound" )
const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset"
ExclusiveClusterSetLabel LabelKey
const ( // ManagedClusterSetConditionEmpty means no ManagedCluster is included in the // ManagedClusterSet. ManagedClusterSetConditionEmpty string = "ClusterSetEmpty" )
Variables ¶
var ( GroupName = "cluster.open-cluster-management.io" GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta2"} // Install is a function which adds this version to a scheme Install = schemeBuilder.AddToScheme // SchemeGroupVersion generated code relies on this name // Deprecated SchemeGroupVersion = GroupVersion // AddToScheme exists solely to keep the old generators creating valid code // DEPRECATED AddToScheme = schemeBuilder.AddToScheme )
Functions ¶
func BuildClusterSelector ¶
func BuildClusterSelector(clusterSet *ManagedClusterSet) (labels.Selector, error)
func GetClustersFromClusterSet ¶
func GetClustersFromClusterSet(clusterSet *ManagedClusterSet, clustersGetter ManagedClustersGetter) ([]*v1.ManagedCluster, error)
GetClustersFromClusterSet return the ManagedClusterSet's managedClusters
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED
Types ¶
type ManagedClusterSelector ¶
type ManagedClusterSelector struct { // SelectorType could only be "ExclusiveClusterSetLabel" or "LabelSelector" // "ExclusiveClusterSetLabel" means to use label "cluster.open-cluster-management.io/clusterset:<ManagedClusterSet Name>"" to select target clusters. // "LabelSelector" means use labelSelector to select target managedClusters // +kubebuilder:validation:Enum=ExclusiveClusterSetLabel;LabelSelector // +kubebuilder:default:=ExclusiveClusterSetLabel // +required SelectorType SelectorType `json:"selectorType,omitempty"` // LabelSelector define the general labelSelector which clusterset will use to select target managedClusters // +optional LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` }
ManagedClusterSelector represents a selector of ManagedClusters
func (*ManagedClusterSelector) DeepCopy ¶
func (in *ManagedClusterSelector) DeepCopy() *ManagedClusterSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSelector.
func (*ManagedClusterSelector) DeepCopyInto ¶
func (in *ManagedClusterSelector) DeepCopyInto(out *ManagedClusterSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedClusterSelector) SwaggerDoc ¶
func (ManagedClusterSelector) SwaggerDoc() map[string]string
type ManagedClusterSet ¶
type ManagedClusterSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the attributes of the ManagedClusterSet // +kubebuilder:default={clusterSelector: {selectorType: ExclusiveClusterSetLabel}} Spec ManagedClusterSetSpec `json:"spec"` // Status represents the current status of the ManagedClusterSet // +optional Status ManagedClusterSetStatus `json:"status,omitempty"` }
ManagedClusterSet defines a group of ManagedClusters that user's workload can run on. A workload can be defined to deployed on a ManagedClusterSet, which mean:
- The workload can run on any ManagedCluster in the ManagedClusterSet
- The workload cannot run on any ManagedCluster outside the ManagedClusterSet
- The service exposed by the workload can be shared in any ManagedCluster in the ManagedClusterSet
In order to assign a ManagedCluster to a certian ManagedClusterSet, add a label with name `cluster.open-cluster-management.io/clusterset` on the ManagedCluster to refers to the ManagedClusterSet. User is not allow to add/remove this label on a ManagedCluster unless they have a RBAC rule to CREATE on a virtual subresource of managedclustersets/join. In order to update this label, user must have the permission on both the old and new ManagedClusterSet.
func GetClusterSetsOfCluster ¶
func GetClusterSetsOfCluster(cluster *v1.ManagedCluster, clusterSetsGetter ManagedClusterSetsGetter) ([]*ManagedClusterSet, error)
GetClusterSetsOfClusterByCluster return the managedClusterSets of a managedCluster
func (*ManagedClusterSet) DeepCopy ¶
func (in *ManagedClusterSet) DeepCopy() *ManagedClusterSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSet.
func (*ManagedClusterSet) DeepCopyInto ¶
func (in *ManagedClusterSet) DeepCopyInto(out *ManagedClusterSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagedClusterSet) DeepCopyObject ¶
func (in *ManagedClusterSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ManagedClusterSet) SwaggerDoc ¶
func (ManagedClusterSet) SwaggerDoc() map[string]string
type ManagedClusterSetBinding ¶
type ManagedClusterSetBinding struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the attributes of ManagedClusterSetBinding. Spec ManagedClusterSetBindingSpec `json:"spec"` // Status represents the current status of the ManagedClusterSetBinding // +optional Status ManagedClusterSetBindingStatus `json:"status,omitempty"` }
ManagedClusterSetBinding projects a ManagedClusterSet into a certain namespace. User is able to create a ManagedClusterSetBinding in a namespace and bind it to a ManagedClusterSet if they have an RBAC rule to CREATE on the virtual subresource of managedclustersets/bind. Workloads created in the same namespace can only be distributed to ManagedClusters in ManagedClusterSets bound in this namespace by higher level controllers.
func GetBoundManagedClusterSetBindings ¶
func GetBoundManagedClusterSetBindings(namespace string, clusterSetBindingsGetter ManagedClusterSetBindingsGetter) ([]*ManagedClusterSetBinding, error)
GetBoundManagedClusterSetBindings returns all bindings that are bounded to clustersets in the given namespace.
func (*ManagedClusterSetBinding) DeepCopy ¶
func (in *ManagedClusterSetBinding) DeepCopy() *ManagedClusterSetBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBinding.
func (*ManagedClusterSetBinding) DeepCopyInto ¶
func (in *ManagedClusterSetBinding) DeepCopyInto(out *ManagedClusterSetBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagedClusterSetBinding) DeepCopyObject ¶
func (in *ManagedClusterSetBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ManagedClusterSetBinding) SwaggerDoc ¶
func (ManagedClusterSetBinding) SwaggerDoc() map[string]string
type ManagedClusterSetBindingList ¶
type ManagedClusterSetBindingList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is a list of ManagedClusterSetBinding. Items []ManagedClusterSetBinding `json:"items"` }
ManagedClusterSetBindingList is a collection of ManagedClusterSetBinding.
func (*ManagedClusterSetBindingList) DeepCopy ¶
func (in *ManagedClusterSetBindingList) DeepCopy() *ManagedClusterSetBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBindingList.
func (*ManagedClusterSetBindingList) DeepCopyInto ¶
func (in *ManagedClusterSetBindingList) DeepCopyInto(out *ManagedClusterSetBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagedClusterSetBindingList) DeepCopyObject ¶
func (in *ManagedClusterSetBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ManagedClusterSetBindingList) SwaggerDoc ¶
func (ManagedClusterSetBindingList) SwaggerDoc() map[string]string
type ManagedClusterSetBindingSpec ¶
type ManagedClusterSetBindingSpec struct { // ClusterSet is the name of the ManagedClusterSet to bind. It must match the // instance name of the ManagedClusterSetBinding and cannot change once created. // User is allowed to set this field if they have an RBAC rule to CREATE on the // virtual subresource of managedclustersets/bind. // +kubebuilder:validation:MinLength=1 ClusterSet string `json:"clusterSet"` }
ManagedClusterSetBindingSpec defines the attributes of ManagedClusterSetBinding.
func (*ManagedClusterSetBindingSpec) DeepCopy ¶
func (in *ManagedClusterSetBindingSpec) DeepCopy() *ManagedClusterSetBindingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBindingSpec.
func (*ManagedClusterSetBindingSpec) DeepCopyInto ¶
func (in *ManagedClusterSetBindingSpec) DeepCopyInto(out *ManagedClusterSetBindingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedClusterSetBindingSpec) SwaggerDoc ¶
func (ManagedClusterSetBindingSpec) SwaggerDoc() map[string]string
type ManagedClusterSetBindingStatus ¶
type ManagedClusterSetBindingStatus struct { // Conditions contains the different condition statuses for this ManagedClusterSetBinding. Conditions []metav1.Condition `json:"conditions"` }
ManagedClusterSetBindingStatus represents the current status of the ManagedClusterSetBinding.
func (*ManagedClusterSetBindingStatus) DeepCopy ¶
func (in *ManagedClusterSetBindingStatus) DeepCopy() *ManagedClusterSetBindingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetBindingStatus.
func (*ManagedClusterSetBindingStatus) DeepCopyInto ¶
func (in *ManagedClusterSetBindingStatus) DeepCopyInto(out *ManagedClusterSetBindingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedClusterSetBindingStatus) SwaggerDoc ¶
func (ManagedClusterSetBindingStatus) SwaggerDoc() map[string]string
type ManagedClusterSetBindingsGetter ¶
type ManagedClusterSetBindingsGetter interface {
List(namespace string, selector labels.Selector) (ret []*ManagedClusterSetBinding, err error)
}
type ManagedClusterSetList ¶
type ManagedClusterSetList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is a list of ManagedClusterSet. Items []ManagedClusterSet `json:"items"` }
ManagedClusterSetList is a collection of ManagedClusterSet.
func (*ManagedClusterSetList) DeepCopy ¶
func (in *ManagedClusterSetList) DeepCopy() *ManagedClusterSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetList.
func (*ManagedClusterSetList) DeepCopyInto ¶
func (in *ManagedClusterSetList) DeepCopyInto(out *ManagedClusterSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagedClusterSetList) DeepCopyObject ¶
func (in *ManagedClusterSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ManagedClusterSetList) SwaggerDoc ¶
func (ManagedClusterSetList) SwaggerDoc() map[string]string
type ManagedClusterSetSpec ¶
type ManagedClusterSetSpec struct { // ClusterSelector represents a selector of ManagedClusters // +optional // +kubebuilder:default:={selectorType: ExclusiveClusterSetLabel} ClusterSelector ManagedClusterSelector `json:"clusterSelector,omitempty"` }
ManagedClusterSetSpec describes the attributes of the ManagedClusterSet
func (*ManagedClusterSetSpec) DeepCopy ¶
func (in *ManagedClusterSetSpec) DeepCopy() *ManagedClusterSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetSpec.
func (*ManagedClusterSetSpec) DeepCopyInto ¶
func (in *ManagedClusterSetSpec) DeepCopyInto(out *ManagedClusterSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedClusterSetSpec) SwaggerDoc ¶
func (ManagedClusterSetSpec) SwaggerDoc() map[string]string
type ManagedClusterSetStatus ¶
type ManagedClusterSetStatus struct { // Conditions contains the different condition statuses for this ManagedClusterSet. Conditions []metav1.Condition `json:"conditions"` }
ManagedClusterSetStatus represents the current status of the ManagedClusterSet.
func (*ManagedClusterSetStatus) DeepCopy ¶
func (in *ManagedClusterSetStatus) DeepCopy() *ManagedClusterSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterSetStatus.
func (*ManagedClusterSetStatus) DeepCopyInto ¶
func (in *ManagedClusterSetStatus) DeepCopyInto(out *ManagedClusterSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagedClusterSetStatus) SwaggerDoc ¶
func (ManagedClusterSetStatus) SwaggerDoc() map[string]string
type ManagedClusterSetsGetter ¶
type ManagedClusterSetsGetter interface {
List(selector labels.Selector) (ret []*ManagedClusterSet, err error)
}
type ManagedClustersGetter ¶
type ManagedClustersGetter interface {
List(selector labels.Selector) (ret []*v1.ManagedCluster, err error)
}
type SelectorType ¶
type SelectorType string
const ( // "ExclusiveClusterSetLabel" means to use label "cluster.open-cluster-management.io/clusterset:<ManagedClusterSet Name>"" to select target clusters. ExclusiveClusterSetLabel SelectorType = "ExclusiveClusterSetLabel" // "LabelSelector" means use labelSelector to select target managedClusters LabelSelector SelectorType = "LabelSelector" )