v1alpha1

package
v0.0.0-...-7a9b120 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the orchestra v1alpha1 API group +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:generate=true +groupName=orchestra.multicluster.x-k8s.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "orchestra.multicluster.x-k8s.io", Version: "v1alpha1"}

	// SchemeGroupVersion generated code relies on this name.
	SchemeGroupVersion = GroupVersion

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

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group

Types

type AutoscaleForCapacity

type AutoscaleForCapacity struct {
	// MinClustersBelowCapacityCeiling defines the minimum required number of
	// clusters that are both currently active and able to scale up.
	// +kubebuilder:validation:Minimum=1
	MinClustersBelowCapacityCeiling int `json:"minClustersBelowCapacityCeiling"`
	// MaxClusters defines the maximum number of clusters that can be used to
	// run the workload. If zero or not specified, no maximum is enforced.
	MaxClusters int `json:"maxClusters,omitempty"`
	// WorkloadDetails describes the deployment which is being autoscaled as
	// part of the workload. This information is used to query metrics from each
	// target cluster about the deployment's current ability to scale up/down on
	// that cluster.
	WorkloadDetails *WorkloadDetails `json:"workloadDetails,omitempty"`
	// Indicates that the controller should assume clusters in the SCALING_IN
	// state will be proactively drained by a draining system.
	// TODO: this is hacky, we should revisit it
	UseDraining bool `json:"useDraining,omitempty"`
}

AutoscaleForCapacity defines the configuration for scaling based on ability to obtain capacity.

func (*AutoscaleForCapacity) DeepCopy

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

func (*AutoscaleForCapacity) DeepCopyInto

func (in *AutoscaleForCapacity) DeepCopyInto(out *AutoscaleForCapacity)

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

type GroupVersionKind

type GroupVersionKind struct {
	Group   string `json:"group"`
	Version string `json:"version"`
	Kind    string `json:"kind"`
}

func (*GroupVersionKind) DeepCopy

func (in *GroupVersionKind) DeepCopy() *GroupVersionKind

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

func (*GroupVersionKind) DeepCopyInto

func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind)

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

type MultiKubernetesClusterBinding

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

	Spec   MultiKubernetesClusterBindingSpec   `json:"spec,omitempty"`
	Status MultiKubernetesClusterBindingStatus `json:"status,omitempty"`
}

MultiKubernetesClusterBinding is the Schema for the multikubernetesclusterbindings API

func (*MultiKubernetesClusterBinding) DeepCopy

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

func (*MultiKubernetesClusterBinding) DeepCopyInto

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

func (*MultiKubernetesClusterBinding) DeepCopyObject

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

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

type MultiKubernetesClusterBindingList

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

MultiKubernetesClusterBindingList contains a list of MultiKubernetesClusterBinding

func (*MultiKubernetesClusterBindingList) DeepCopy

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

func (*MultiKubernetesClusterBindingList) DeepCopyInto

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

func (*MultiKubernetesClusterBindingList) DeepCopyObject

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

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

type MultiKubernetesClusterBindingSpec

type MultiKubernetesClusterBindingSpec struct {
	SourceRef    SourceRef    `json:"sourceRef"`
	PlacementRef PlacementRef `json:"placementRef"`
}

MultiKubernetesClusterBindingSpec defines the desired state of MultiKubernetesClusterBinding

func (*MultiKubernetesClusterBindingSpec) DeepCopy

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

func (*MultiKubernetesClusterBindingSpec) DeepCopyInto

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

type MultiKubernetesClusterBindingStatus

type MultiKubernetesClusterBindingStatus struct {
}

MultiKubernetesClusterBindingStatus defines the observed state of MultiKubernetesClusterBinding

func (*MultiKubernetesClusterBindingStatus) DeepCopy

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

func (*MultiKubernetesClusterBindingStatus) DeepCopyInto

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

type MultiKubernetesClusterPlacement

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

	Spec   MultiKubernetesClusterPlacementSpec   `json:"spec,omitempty"`
	Status MultiKubernetesClusterPlacementStatus `json:"status,omitempty"`
}

MultiKubernetesClusterPlacement is the Schema for the multikubernetesclusterplacements API

func (*MultiKubernetesClusterPlacement) DeepCopy

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

func (*MultiKubernetesClusterPlacement) DeepCopyInto

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

func (*MultiKubernetesClusterPlacement) DeepCopyObject

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

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

type MultiKubernetesClusterPlacementList

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

MultiKubernetesClusterPlacementList contains a list of MultiKubernetesClusterPlacement

func (*MultiKubernetesClusterPlacementList) DeepCopy

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

func (*MultiKubernetesClusterPlacementList) DeepCopyInto

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

func (*MultiKubernetesClusterPlacementList) DeepCopyObject

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

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

type MultiKubernetesClusterPlacementSpec

type MultiKubernetesClusterPlacementSpec struct {
	// ClusterSelectorRules defines a pipeline of rules which consume an ordered list
	// of clusters and output an ordered list of clusters to generate the list of
	// current target clusters.
	ClusterSelectorRules []PlacementClusterSelectorRule `json:"clusterSelectorRules"`
	// Scaling defines the scaling configuration of the placement. If not specified,
	// the placement will use all eligible clusters.
	Scaling Scaling `json:"scaling,omitempty"`
}

MultiKubernetesClusterPlacementSpec defines the desired state of MultiKubernetesClusterPlacement

func (*MultiKubernetesClusterPlacementSpec) DeepCopy

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

func (*MultiKubernetesClusterPlacementSpec) DeepCopyInto

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

type MultiKubernetesClusterPlacementStatus

type MultiKubernetesClusterPlacementStatus struct {
	// Clusters is the list of clusters consumed by the workload delivery system
	Clusters               []PlacementCluster `json:"clusters,omitempty"`
	LastAdditionTime       metav1.Time        `json:"lastAdditionTime,omitempty"`
	LastClusterRemovalTime metav1.Time        `json:"lastClusterRemovalTime,omitempty"`
}

MultiKubernetesClusterPlacementStatus defines the observed state of MultiKubernetesClusterPlacement

func (*MultiKubernetesClusterPlacementStatus) DeepCopy

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

func (*MultiKubernetesClusterPlacementStatus) DeepCopyInto

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

type PlacementCluster

type PlacementCluster struct {
	Name               string                `json:"name"`
	Namespace          string                `json:"namespace,omitempty"`
	State              PlacementClusterState `json:"state"`
	LastTransitionTime metav1.Time           `json:"lastTransitionTime"`
	// Whether the cluster is currently at its capacity ceiling. For informational/debugging purposes only. TODO: remove this
	AtCapacityCeiling *bool `json:"atCapacityCeiling,omitempty"`
	// TODO: To make draining pluggable, this should likely be a separate CRD owned by a separate controller
	Draining *PlacementClusterDraining `json:"draining,omitempty"`
}

PlacementCluster describes a cluster on which the workload should be placed. This is consumed by workload delivery systems.

func (*PlacementCluster) DeepCopy

func (in *PlacementCluster) DeepCopy() *PlacementCluster

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

func (*PlacementCluster) DeepCopyInto

func (in *PlacementCluster) DeepCopyInto(out *PlacementCluster)

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

type PlacementClusterDraining

type PlacementClusterDraining struct {
	// Desired maximum replicas for a draining cluster. The drainer plugin should
	// reconcile the HPA's max replicas field to this value.
	DesiredMaxReplicas int `json:"desiredMaxReplicas"`
	// The last time DesiredMaxReplicas was decreased.
	LastReplicaCountDecrease metav1.Time `json:"lastReplicaCountDecrease"`
	// For informational/debugging purposes only. TODO: remove this
	CurrentReplicaCount int `json:"currentReplicaCount,omitempty"`
}

func (*PlacementClusterDraining) DeepCopy

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

func (*PlacementClusterDraining) DeepCopyInto

func (in *PlacementClusterDraining) DeepCopyInto(out *PlacementClusterDraining)

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

type PlacementClusterSelectorRule

type PlacementClusterSelectorRule struct {
	// Type specifies the rule type and may be one of:
	// - all-clusters: all clusters (as defined by the ClusterProfiles)
	// - cluster-list: a user-provided comma-separated ordered list of clusters in
	//   the format cluster-inventory-ns/cluster-name (for each cluster, a
	//   ClusterProfile with the given name must exist in the given namespace)
	// - cluster-name-regex: a user-provided regular expression to match cluster
	//   names against (the available cluster names for matching are defined by
	//   the ClusterProfiles)
	Type PlacementClusterSelectorRuleType `json:"type"`
	// Arguments are specific to each rule type. Here are example usages for the
	// supported arguments:
	// - cluster-list:
	//   clusters: "cluster-inventory-ns/cluster1,cluster-inventory-ns/cluster2,cluster-inventory-ns/cluster3"
	// - cluster-name-regex
	//   regex: "cluster-inventory-ns/cluster\d+"
	Arguments map[string]string `json:"arguments,omitempty"`
}

PlacementClusterSelectorRule defines a rule which takes an ordered list of clusters and returns a list of clusters based on the rule type and arguments.

func (*PlacementClusterSelectorRule) DeepCopy

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

func (*PlacementClusterSelectorRule) DeepCopyInto

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

type PlacementClusterSelectorRuleType

type PlacementClusterSelectorRuleType string

+kubebuilder:validation:Enum=all-clusters;cluster-list;cluster-name-regex

const (
	RuleTypeAllClusters      PlacementClusterSelectorRuleType = "all-clusters"
	RuleTypeClusterList      PlacementClusterSelectorRuleType = "cluster-list"
	RuleTypeClusterNameRegex PlacementClusterSelectorRuleType = "cluster-name-regex"
)

type PlacementClusterState

type PlacementClusterState string

+kubebuilder:validation:Enum=ACTIVE;SCALING_IN;UNHEALTHY;EVICTING

const (
	// Active cluster running the workload
	StateActive PlacementClusterState = "ACTIVE"
	// Cluster running the workload but pending to be removed due to scale in
	StateScalingIn PlacementClusterState = "SCALING_IN"
	// Cluster running the workload but pending to be removed due to no longer
	// being eligible to run the workload
	StateEvicting PlacementClusterState = "EVICTING"
	// Cluster running the workload but pending to be removed due to the
	// workload being unhealthy on the cluster
	StateUnhealthy PlacementClusterState = "UNHEALTHY"
)

type PlacementRef

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

func (*PlacementRef) DeepCopy

func (in *PlacementRef) DeepCopy() *PlacementRef

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

func (*PlacementRef) DeepCopyInto

func (in *PlacementRef) DeepCopyInto(out *PlacementRef)

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

type Scaling

type Scaling struct {
	// AutoscaleForCapacity defines the configuration for scaling based on ability to obtain capacity.
	AutoscaleForCapacity *AutoscaleForCapacity `json:"autoscaleForCapacity,omitempty"`
}

Scaling defines the scaling configuration of the placement. If not specified, the placement will use all eligible clusters. Only one of the scaling configurations can be specified.

func (*Scaling) DeepCopy

func (in *Scaling) DeepCopy() *Scaling

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

func (*Scaling) DeepCopyInto

func (in *Scaling) DeepCopyInto(out *Scaling)

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

type SourceRef

type SourceRef struct {
	Name             string           `json:"name"`
	GroupVersionKind GroupVersionKind `json:"groupVersionKind"`
	ContentPath      string           `json:"contentPath"`
}

func (*SourceRef) DeepCopy

func (in *SourceRef) DeepCopy() *SourceRef

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

func (*SourceRef) DeepCopyInto

func (in *SourceRef) DeepCopyInto(out *SourceRef)

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

type WorkloadDetails

type WorkloadDetails struct {
	// Namespace is the namespace of the workload to be placed.
	Namespace string `json:"namespace,omitempty"`
	// DeploymentName is the name of the deployment to be placed.
	DeploymentName string `json:"deploymentName"`
	// HPAName is the name of the HPA to be placed.
	HPAName string `json:"hpaName"`
}

WorkloadDetails describes the deployment which scaling decisions should be based on.

func (*WorkloadDetails) DeepCopy

func (in *WorkloadDetails) DeepCopy() *WorkloadDetails

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

func (*WorkloadDetails) DeepCopyInto

func (in *WorkloadDetails) DeepCopyInto(out *WorkloadDetails)

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