v1beta2

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 42

Documentation

Overview

+kubebuilder:validation:Optional +groupName=cluster.open-cluster-management.io

Index

Constants

View Source
const (
	// ClusterSetBindingBoundType is a condition type of clustersetbinding representing
	// whether the ClusterSetBinding is bound to a clusterset.
	ClusterSetBindingBoundType = "Bound"
)
View Source
const ClusterSetLabel = "cluster.open-cluster-management.io/clusterset"

ExclusiveClusterSetLabel LabelKey

View Source
const (
	// ManagedClusterSetConditionEmpty means no ManagedCluster is included in the
	// ManagedClusterSet.
	ManagedClusterSetConditionEmpty string = "ClusterSetEmpty"
)

Variables

View Source
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

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:

  1. The workload can run on any ManagedCluster in the ManagedClusterSet
  2. The workload cannot run on any ManagedCluster outside the ManagedClusterSet
  3. 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

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

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

func (*ManagedClusterSetBindingList) DeepCopyInto

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

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

func (*ManagedClusterSetBindingSpec) DeepCopyInto

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

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

func (*ManagedClusterSetBindingStatus) DeepCopyInto

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

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

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

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

Jump to

Keyboard shortcuts

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