v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Overview

+kubebuilder:object:generate=true +k8s:deepcopy-gen=package,register +groupName=fleet.azure.com

+kubebuilder:object:generate=true +groupName=fleet.azure.com

Index

Constants

View Source
const (
	MemberClusterKind                = "MemberCluster"
	MemberClusterResource            = "memberclusters"
	InternalMemberClusterKind        = "InternalMemberCluster"
	ClusterResourcePlacementKind     = "ClusterResourcePlacement"
	ClusterResourcePlacementResource = "clusterresourceplacements"
)
View Source
const (
	// ConditionTypeInternalMemberClusterJoin is used to track the join state of the InternalMemberCluster.
	// its conditionStatus can be "True" == Joined, "Unknown" == Joining/Leaving, "False" == Left
	ConditionTypeInternalMemberClusterJoin string = "Joined"

	// ConditionTypeInternalMemberClusterHeartbeat is used to track the Heartbeat state of the InternalMemberCluster.
	// Its conditionStatus can be "True" == Heartbeat is received, or "Unknown" == Heartbeat is not received yet. "False" is unused.
	ConditionTypeInternalMemberClusterHeartbeat string = "HeartbeatReceived"

	// ConditionTypeInternalMemberClusterHealth is used to track the Health state of the InternalMemberCluster.
	// its conditionStatus can be "True" == Healthy, "False" == UnHealthy. "Unknown" is unused.
	ConditionTypeInternalMemberClusterHealth string = "Healthy"
)

TODO need to be removed

View Source
const (
	// ConditionTypeMemberClusterReadyToJoin is used to track the readiness of the hub cluster
	// controller to accept the new member cluster.
	// its conditionStatus can only be "True" == ReadyToJoin
	ConditionTypeMemberClusterReadyToJoin string = "ReadyToJoin"

	// ConditionTypeMemberClusterJoin is used to track the join state of the memberCluster.
	// its conditionStatus can be "True" == Joined, "Unknown" == Joining/Leaving, "False" == Left
	ConditionTypeMemberClusterJoin string = "Joined"

	// ConditionTypeMemberClusterHealthy is used to track the Health state of the MemberCluster.
	// its conditionStatus can be "True" == Healthy, "Unknown" == Health degraded, "False" == UnHealthy
	ConditionTypeMemberClusterHealth string = "Healthy"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "fleet.azure.com", Version: "v1alpha1"}

	// 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 Affinity

type Affinity struct {
	// ClusterAffinity describes cluster affinity scheduling rules for the resources.
	// +optional
	ClusterAffinity *ClusterAffinity `json:"clusterAffinity,omitempty"`
}

Affinity represents the filter to select clusters. The selectors in this struct are `ANDed`.

func (*Affinity) DeepCopy

func (in *Affinity) DeepCopy() *Affinity

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

func (*Affinity) DeepCopyInto

func (in *Affinity) DeepCopyInto(out *Affinity)

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

type AgentConditionType

type AgentConditionType string

AgentConditionType identifies a specific condition on the Agent.

const (
	// AgentJoined is used to track the join state of the agent.
	// Its conditionStatus can be "True" == Joined, "Unknown" == Joining/Leaving, "False" == Left.
	AgentJoined AgentConditionType = "Joined"
	// AgentHealthy is used to track the Health state of the agent.
	// Its conditionStatus can be "True" == Healthy, "False" == UnHealthy. "Unknown" is unused.
	AgentHealthy AgentConditionType = "Healthy"
)

type AgentStatus

type AgentStatus struct {
	// Type of agent type.
	// +required
	Type AgentType `json:"type"`

	// Conditions field contains the different condition statuses for this member cluster, eg join and health status.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Last time we got the heartbeat.
	// +optional
	LastReceivedHeartbeat metav1.Time `json:"lastReceivedHeartbeat,omitempty"`
}

AgentStatus contains status information received for the particular agent type.

func (*AgentStatus) DeepCopy

func (in *AgentStatus) DeepCopy() *AgentStatus

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

func (*AgentStatus) DeepCopyInto

func (in *AgentStatus) DeepCopyInto(out *AgentStatus)

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

type AgentType

type AgentType string

AgentType defines agent/binary running in the member cluster.

const (
	// MemberAgent (core) handles the join/unjoin and work orchestration of the multi-clusters.
	MemberAgent AgentType = "MemberAgent"
	// MultiClusterServiceAgent (networking) is responsible for exposing multi-cluster services via L4 load
	// balancer.
	MultiClusterServiceAgent AgentType = "MultiClusterServiceAgent"
	// ServiceExportImportAgent (networking) is responsible for export or import services across multi-clusters.
	ServiceExportImportAgent AgentType = "ServiceExportImportAgent"
)

type ClusterAffinity

type ClusterAffinity struct {
	// ClusterSelectorTerms is a list of cluster selector terms. The terms are `ORed`.
	// kubebuilder:validation:MaxItems=10
	// +optional
	ClusterSelectorTerms []ClusterSelectorTerm `json:"clusterSelectorTerms,omitempty"`
}

ClusterAffinity represents the filter to select clusters.

func (*ClusterAffinity) DeepCopy

func (in *ClusterAffinity) DeepCopy() *ClusterAffinity

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

func (*ClusterAffinity) DeepCopyInto

func (in *ClusterAffinity) DeepCopyInto(out *ClusterAffinity)

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

type ClusterResourcePlacement

type ClusterResourcePlacement struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec represents the desired behavior of ClusterResourcePlacement.
	// +required
	Spec ClusterResourcePlacementSpec `json:"spec"`

	// Most recently observed status of the ClusterResourcePlacement.
	// +optional
	Status ClusterResourcePlacementStatus `json:"status,omitempty"`
}

ClusterResourcePlacement is used to place cluster scoped resources or ALL the resources in a namespace onto one or more member clusters in a fleet. Users cannot select resources in a system reserved namespace. System reserved namespaces are: kube-system, fleet-system, fleet-work-*.

func (*ClusterResourcePlacement) DeepCopy

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

func (*ClusterResourcePlacement) DeepCopyInto

func (in *ClusterResourcePlacement) DeepCopyInto(out *ClusterResourcePlacement)

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

func (*ClusterResourcePlacement) DeepCopyObject

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

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

func (*ClusterResourcePlacement) GetCondition

func (m *ClusterResourcePlacement) GetCondition(conditionType string) *metav1.Condition

func (*ClusterResourcePlacement) SetConditions

func (m *ClusterResourcePlacement) SetConditions(conditions ...metav1.Condition)

type ClusterResourcePlacementList

type ClusterResourcePlacementList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterResourcePlacement `json:"items"`
}

ClusterResourcePlacementList contains a list of ClusterResourcePlacement.

func (*ClusterResourcePlacementList) DeepCopy

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

func (*ClusterResourcePlacementList) DeepCopyInto

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

func (*ClusterResourcePlacementList) DeepCopyObject

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

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

type ClusterResourcePlacementSpec

type ClusterResourcePlacementSpec struct {
	// ResourceSelectors is used to select cluster scoped resources. The selectors are `ORed`.
	// kubebuilder:validation:MaxItems=100
	// +required
	ResourceSelectors []ClusterResourceSelector `json:"resourceSelectors"`

	// Policy represents the placement policy to select clusters to place all the selected resources.
	// Default is place to the entire fleet if this field is omitted.
	// +optional
	Policy *PlacementPolicy `json:"policy,omitempty"`
}

ClusterResourcePlacementSpec represents the desired behavior of a ClusterResourcePlacement object.

func (*ClusterResourcePlacementSpec) DeepCopy

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

func (*ClusterResourcePlacementSpec) DeepCopyInto

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

type ClusterResourcePlacementStatus

type ClusterResourcePlacementStatus struct {
	// Conditions field contains the overall condition statuses for this resource.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions"`

	// SelectedResources is a list of the resources the resource selector selects.
	// +optional
	SelectedResources []ResourceIdentifier `json:"selectedResources,omitempty"`

	// TargetClusters is a list of cluster names that this resource should run on.
	// +optional
	TargetClusters []string `json:"targetClusters,omitempty"`

	// FailedResourcePlacements is a list of all failed to place resources status.
	// kubebuilder:validation:MaxItems=1000
	// +optional
	FailedResourcePlacements []FailedResourcePlacement `json:"failedPlacements,omitempty"`
}

ClusterResourcePlacementStatus defines the observed state of resource.

func (*ClusterResourcePlacementStatus) DeepCopy

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

func (*ClusterResourcePlacementStatus) DeepCopyInto

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

type ClusterResourceSelector

type ClusterResourceSelector struct {
	// Group is the group name of the target resource.
	// +required
	Group string `json:"group"`

	// Version is the version of the target resource.
	// +required
	Version string `json:"version"`

	// Kind is the kind of the target resources.
	// Note: When the `kind` field is `namespace` then all the resources inside that namespace is selected.
	// +required
	Kind string `json:"kind"`

	// Name is the name of the target resource.
	// Default is empty, which means selecting all resources.
	// This field is mutually exclusive with the `labelSelector` field.
	// +optional
	Name string `json:"name,omitempty"`

	// labelSelector spells out a label query over a set of resources.
	// This field is mutually exclusive with the `name` field.
	// +optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
}

ClusterResourceSelector is used to specify cluster scoped resources to be selected. Note: When the cluster resource is of type `namespace`, ALL the resources in this namespace are selected. All the fields present in this structure are `ANDed`.

func (*ClusterResourceSelector) DeepCopy

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

func (*ClusterResourceSelector) DeepCopyInto

func (in *ClusterResourceSelector) DeepCopyInto(out *ClusterResourceSelector)

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

type ClusterSelectorTerm

type ClusterSelectorTerm struct {
	// LabelSelector is a label query over the clusters.
	// +required
	LabelSelector metav1.LabelSelector `json:"labelSelector"`
}

ClusterSelectorTerm represents the requirements to selected clusters.

func (*ClusterSelectorTerm) DeepCopy

func (in *ClusterSelectorTerm) DeepCopy() *ClusterSelectorTerm

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

func (*ClusterSelectorTerm) DeepCopyInto

func (in *ClusterSelectorTerm) DeepCopyInto(out *ClusterSelectorTerm)

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

type ClusterState

type ClusterState string
const (
	ClusterStateJoin  ClusterState = "Join"
	ClusterStateLeave ClusterState = "Leave"
)

type FailedResourcePlacement

type FailedResourcePlacement struct {
	ResourceIdentifier `json:",inline"`

	// ClusterName is the name of the cluster that this resource is placed on.
	// +required
	ClusterName string `json:"clusterName"`

	// Condition contains the failed condition status for this failed to place resource.
	// +required
	Condition metav1.Condition `json:"condition"`
}

FailedResourcePlacement shows the failure details of a failed resource placement.

func (*FailedResourcePlacement) DeepCopy

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

func (*FailedResourcePlacement) DeepCopyInto

func (in *FailedResourcePlacement) DeepCopyInto(out *FailedResourcePlacement)

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

type InternalMemberCluster

type InternalMemberCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   InternalMemberClusterSpec   `json:"spec"`
	Status InternalMemberClusterStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,categories={fleet},shortName=internalcluster +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

func (*InternalMemberCluster) DeepCopy

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

func (*InternalMemberCluster) DeepCopyInto

func (in *InternalMemberCluster) DeepCopyInto(out *InternalMemberCluster)

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

func (*InternalMemberCluster) DeepCopyObject

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

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

func (*InternalMemberCluster) GetCondition

func (m *InternalMemberCluster) GetCondition(conditionType string) *metav1.Condition

func (*InternalMemberCluster) SetConditions

func (m *InternalMemberCluster) SetConditions(conditions ...metav1.Condition)

type InternalMemberClusterList

type InternalMemberClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []InternalMemberCluster `json:"items"`
}

InternalMemberClusterList contains a list of InternalMemberCluster.

func (*InternalMemberClusterList) DeepCopy

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

func (*InternalMemberClusterList) DeepCopyInto

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

func (*InternalMemberClusterList) DeepCopyObject

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

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

type InternalMemberClusterSpec

type InternalMemberClusterSpec struct {

	// +kubebuilder:validation:Required,Enum=Join;Leave
	State ClusterState `json:"state"`

	// +optional
	// +kubebuilder:default=60
	HeartbeatPeriodSeconds int32 `json:"leaseDurationSeconds,omitempty"`
}

InternalMemberClusterSpec defines the desired state of InternalMemberCluster for the hub agent.

func (*InternalMemberClusterSpec) DeepCopy

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

func (*InternalMemberClusterSpec) DeepCopyInto

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

type InternalMemberClusterStatus

type InternalMemberClusterStatus struct {
	// Conditions field contains the different condition statuses for this member cluster.
	// TODO: need to be deleted
	// +required
	Conditions []metav1.Condition `json:"conditions"`

	// Capacity represents the total resource capacity from all nodeStatues on the member cluster.
	// TODO: need to be deleted
	// +required
	Capacity v1.ResourceList `json:"capacity"`

	// Allocatable represents the total allocatable resources on the member cluster.
	// TODO: need to be deleted
	// +required
	Allocatable v1.ResourceList `json:"allocatable"`

	// Resource usage collected from member cluster.
	// +optional
	ResourceUsage ResourceUsage `json:"resourceUsage,omitempty"`

	// AgentStatus field contains the status for each agent running in the member cluster.
	// +optional
	AgentStatus []AgentStatus `json:"agentStatus,omitempty"`
}

InternalMemberClusterStatus defines the observed state of InternalMemberCluster.

func (*InternalMemberClusterStatus) DeepCopy

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

func (*InternalMemberClusterStatus) DeepCopyInto

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

type MemberCluster

type MemberCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MemberClusterSpec   `json:"spec"`
	Status MemberClusterStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,categories={fleet},shortName=membercluster +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="ConditionTypeMemberClusterJoin")].status`,name="Joined",type=string +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date +kubebuilder:printcolumn:JSONPath=`.metadata.label[fleet.azure.com/clusterHealth]`,name="HealthStatus",type=string

func (*MemberCluster) DeepCopy

func (in *MemberCluster) DeepCopy() *MemberCluster

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

func (*MemberCluster) DeepCopyInto

func (in *MemberCluster) DeepCopyInto(out *MemberCluster)

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

func (*MemberCluster) DeepCopyObject

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

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

func (*MemberCluster) GetCondition

func (m *MemberCluster) GetCondition(conditionType string) *metav1.Condition

func (*MemberCluster) RemoveCondition

func (m *MemberCluster) RemoveCondition(conditionType string)

func (*MemberCluster) SetConditions

func (m *MemberCluster) SetConditions(conditions ...metav1.Condition)

type MemberClusterList

type MemberClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MemberCluster `json:"items"`
}

MemberClusterList contains a list of MemberCluster.

func (*MemberClusterList) DeepCopy

func (in *MemberClusterList) DeepCopy() *MemberClusterList

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

func (*MemberClusterList) DeepCopyInto

func (in *MemberClusterList) DeepCopyInto(out *MemberClusterList)

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

func (*MemberClusterList) DeepCopyObject

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

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

type MemberClusterSpec

type MemberClusterSpec struct {

	// +kubebuilder:validation:Required,Enum=Join;Leave
	State ClusterState `json:"state"`

	// +required
	Identity rbacv1.Subject `json:"identity"`

	// +kubebuilder:default=60
	// +optional
	HeartbeatPeriodSeconds int32 `json:"leaseDurationSeconds,omitempty"`
}

MemberClusterSpec defines the desired state of MemberCluster.

func (*MemberClusterSpec) DeepCopy

func (in *MemberClusterSpec) DeepCopy() *MemberClusterSpec

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

func (*MemberClusterSpec) DeepCopyInto

func (in *MemberClusterSpec) DeepCopyInto(out *MemberClusterSpec)

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

type MemberClusterStatus

type MemberClusterStatus struct {
	// Conditions is an array of current observed conditions for this member cluster.
	// +required
	Conditions []metav1.Condition `json:"conditions"`

	// Capacity represents the total resources of all the nodes within the member cluster.
	// TODO: need to be deleted
	// +optional
	Capacity v1.ResourceList `json:"capacity,omitempty"`

	// Allocatable represents the total resources of all the nodes within the member cluster that are available for scheduling.
	// TODO: need to be deleted
	// +optional
	Allocatable v1.ResourceList `json:"allocatable,omitempty"`

	// Resource usage collected from member cluster.
	// +optional
	ResourceUsage ResourceUsage `json:"resourceUsage,omitempty"`

	// AgentStatus field contains the status for each agent running in the member cluster.
	// +optional
	AgentStatus []AgentStatus `json:"agentStatus,omitempty"`
}

MemberClusterStatus defines the observed state of MemberCluster.

func (*MemberClusterStatus) DeepCopy

func (in *MemberClusterStatus) DeepCopy() *MemberClusterStatus

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

func (*MemberClusterStatus) DeepCopyInto

func (in *MemberClusterStatus) DeepCopyInto(out *MemberClusterStatus)

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

type PlacementPolicy

type PlacementPolicy struct {
	// ClusterNames is a request to schedule the selected resource to a list of member clusters.
	// If exists, we only place the resources within the clusters in this list.
	// kubebuilder:validation:MaxItems=100
	// +optional
	ClusterNames []string `json:"clusterNames,omitempty"`

	// Affinity represents the selected resources' scheduling constraints.
	// If not set, the entire fleet can be scheduling candidate.
	// +optional
	Affinity *Affinity `json:"affinity,omitempty"`
}

PlacementPolicy represents the rule for select clusters.

func (*PlacementPolicy) DeepCopy

func (in *PlacementPolicy) DeepCopy() *PlacementPolicy

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

func (*PlacementPolicy) DeepCopyInto

func (in *PlacementPolicy) DeepCopyInto(out *PlacementPolicy)

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

type ResourceIdentifier

type ResourceIdentifier struct {
	// Group is the group name of the selected resource.
	// +required
	Group string `json:"group,omitempty"`

	// Version is the version of the selected resource.
	// +required
	Version string `json:"version,omitempty"`

	// Kind represents the Kind of the selected resources.
	// +required
	Kind string `json:"kind"`

	// Name of the target resource.
	// +required
	Name string `json:"name"`

	// Namespace is the namespace of the resource, the resource is cluster scoped if the value is empty.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

ResourceIdentifier points to one resource we selected

func (*ResourceIdentifier) DeepCopy

func (in *ResourceIdentifier) DeepCopy() *ResourceIdentifier

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

func (*ResourceIdentifier) DeepCopyInto

func (in *ResourceIdentifier) DeepCopyInto(out *ResourceIdentifier)

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

type ResourcePlacementConditionType

type ResourcePlacementConditionType string

ResourcePlacementConditionType identifies a specific condition on a workload.

const (
	// ResourcePlacementConditionTypeScheduled indicates if we have successfully identified the set of clusters on which
	// the selected resources should run and created work CRs in the per-cluster namespace.
	// its conditionStatus can be "True" == Scheduled, "False" == Failed to Schedule
	ResourcePlacementConditionTypeScheduled ResourcePlacementConditionType = "Scheduled"

	// ResourcePlacementStatusConditionTypeApplied indicates if the referenced workload is applied on the selected member cluster.
	// its conditionStatus can be "True" == All referenced workloads are applied, "False" == Not all are applied
	ResourcePlacementStatusConditionTypeApplied ResourcePlacementConditionType = "Applied"
)

type ResourceUsage

type ResourceUsage struct {
	// Capacity represents the total resource capacity from all nodeStatues on the member cluster.
	// +optional
	Capacity v1.ResourceList `json:"capacity,omitempty"`

	// Allocatable represents the total allocatable resources on the member cluster.
	// +optional
	Allocatable v1.ResourceList `json:"allocatable,omitempty"`

	// The time we observe the member cluster resource usage, including capacity and allocatable.
	// +optional
	ObservationTime metav1.Time `json:"observationTime,omitempty"`
}

ResourceUsage represents the resource usage collected from the member cluster and its observation time.

func (*ResourceUsage) DeepCopy

func (in *ResourceUsage) DeepCopy() *ResourceUsage

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

func (*ResourceUsage) DeepCopyInto

func (in *ResourceUsage) DeepCopyInto(out *ResourceUsage)

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

Jump to

Keyboard shortcuts

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