placements

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SchedulerNameDefault tells using default scheduler (mcm)
	SchedulerNameDefault = "default"
	// SchedulerNameMCM tells using mcm as scheduler
	SchedulerNameMCM = "mcm"

	// UserIdentityAnnotation is user identity annotation
	UserIdentityAnnotation = "open-cluster-management.io/user-identity"

	// UserGroupAnnotation is user group annotation
	UserGroupAnnotation = "open-cluster-management.io/user-group"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConditionFilter

type ClusterConditionFilter struct {
	Type   string                 `json:"type,omitempty"`
	Status metav1.ConditionStatus `json:"status,omitempty"`
}

ClusterConditionFilter defines filter to filter cluster condition

type GenericClusterReference

type GenericClusterReference struct {
	Name string `json:"name"`
}

GenericClusterReference - in alignment with kubefed

type GenericPlacementFields

type GenericPlacementFields struct {
	Clusters        []GenericClusterReference `json:"clusters,omitempty"`
	ClusterSelector *metav1.LabelSelector     `json:"clusterSelector,omitempty"`
}

GenericPlacementFields - in alignment with kubefed

type Placement

type Placement struct {
	GenericPlacementFields `json:",inline"`
	PlacementRef           *corev1.ObjectReference `json:"placementRef,omitempty"`
	Local                  *bool                   `json:"local,omitempty"`
}

Placement field to be referenced in specs, align with Fedv2, add placementref

type PlacementBinding

type PlacementBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	PlacementRef      PlacementSubject       `json:"placementRef"`
	Subjects          []Subject              `json:"subjects"`
	Status            PlacementBindingStatus `json:"status,omitempty"`
}

PlacementBinding is the Schema for the placementbindings API

type PlacementBindingList

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

PlacementBindingList contains a list of PlacementBinding

type PlacementBindingStatus

type PlacementBindingStatus struct{}

PlacementBindingStatus defines the observed state of PlacementBinding

type PlacementDecision

type PlacementDecision struct {
	ClusterName      string `json:"clusterName,omitempty"`
	ClusterNamespace string `json:"clusterNamespace,omitempty"`
}

PlacementDecision defines the decision made by controller

type PlacementRule

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

	Spec   PlacementRuleSpec   `json:"spec"`
	Status PlacementRuleStatus `json:"status,omitempty"`
}

PlacementRule is the Schema for the placementrules API

type PlacementRuleList

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

PlacementRuleList contains a list of PlacementRule

type PlacementRuleSpec

type PlacementRuleSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// schedulerName, default to use mcm controller
	SchedulerName string `json:"schedulerName,omitempty"`
	// number of replicas Application wants to
	ClusterReplicas        *int32 `json:"clusterReplicas,omitempty"`
	GenericPlacementFields `json:",inline"`
	ClusterConditions      []ClusterConditionFilter `json:"clusterConditions,omitempty"`
	// Select Resource
	ResourceHint *ResourceHint `json:"resourceHint,omitempty"`
	// Set Policy Filters
	Policies []corev1.ObjectReference `json:"policies,omitempty"`
}

PlacementRuleSpec defines the desired state of PlacementRule

type PlacementRuleStatus

type PlacementRuleStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Decisions []PlacementDecision `json:"decisions,omitempty"`
}

PlacementRuleStatus defines the observed state of PlacementRule

type PlacementSubject

type PlacementSubject struct {
	APIGroup string `json:"apiGroup"`
	Kind     string `json:"kind"`
	Name     string `json:"name"`
}

PlacementSubject defines the resource that can be used as PlacementBinding placementRef

type ResourceHint

type ResourceHint struct {
	Type  ResourceType   `json:"type,omitempty"`
	Order SelectionOrder `json:"order,omitempty"`
}

ResourceHint is used to sort the output

type ResourceType

type ResourceType string

ResourceType defines types can be sorted

const (
	ResourceTypeNone   ResourceType = ""
	ResourceTypeCPU    ResourceType = "cpu"
	ResourceTypeMemory ResourceType = "memory"
)

These are valid conditions of a cluster.

type SelectionOrder

type SelectionOrder string

SelectionOrder is the type for Nodes

const (
	SelectionOrderNone SelectionOrder = ""
	SelectionOrderDesc SelectionOrder = "desc"
	SelectionOrderAsce SelectionOrder = "asc"
)

These are valid conditions of a cluster.

type Subject

type Subject struct {
	APIGroup string `json:"apiGroup"`
	Kind     string `json:"kind"`
	Name     string `json:"name"`
}

Subject defines the resource that can be used as PlacementBinding subject

Jump to

Keyboard shortcuts

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