v1alpha1

package
v0.0.0-...-6bb55df Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package,register +groupName=scheduling.hypershift.openshift.io +k8s:openapi-gen=true

Index

Constants

View Source
const (
	ClusterSizingConfigurationValidType = "ClusterSizingConfigurationValid"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: scheduling.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type ClusterSizingConfiguration

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

	Spec   ClusterSizingConfigurationSpec   `json:"spec,omitempty"`
	Status ClusterSizingConfigurationStatus `json:"status,omitempty"`
}

ClusterSizingConfiguration defines the desired state of ClusterSizingConfiguration. Configuration options here allow management cluster administrators to define sizing classes for hosted clusters and how the system should adapt hosted cluster functionality based on size.

func (*ClusterSizingConfiguration) DeepCopy

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

func (*ClusterSizingConfiguration) DeepCopyInto

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

func (*ClusterSizingConfiguration) DeepCopyObject

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

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

type ClusterSizingConfigurationList

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

ClusterSizingConfigurationList contains a list of ClusterSizingConfiguration.

func (*ClusterSizingConfigurationList) DeepCopy

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

func (*ClusterSizingConfigurationList) DeepCopyInto

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

func (*ClusterSizingConfigurationList) DeepCopyObject

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

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

type ClusterSizingConfigurationSpec

type ClusterSizingConfigurationSpec struct {

	// Sizes holds the different t-shirt size classes into which guest clusters will be sorted.
	// Each size class applies to guest clusters using node count criteria; it is required that
	// the entire interval between [0,+inf) be covered by the set of sizes provided here.
	Sizes []SizeConfiguration `json:"sizes,omitempty"`

	// Concurrency defines the bounds of allowed behavior for clusters transitioning between sizes.
	// Transitions will require that request-serving pods be re-scheduled between nodes, so each
	// transition incurs a small user-facing cost as well as a cost to the management cluster. Use
	// the concurrency configuration options to manage how many transitions can be occurring.
	// If unset, a sensible default will be provided.
	Concurrency ConcurrencyConfiguration `json:"concurrency,omitempty"`

	// TransitionDelay configures how quickly the system reacts to clusters transitioning between size classes.
	// It may be advantageous, for instance, to have a near-instant scale-down for clusters that begin to
	// use fewer resources, but allow for some lag on scale-up to ensure that the use is sustained before
	// incurring the larger cost for scale-up.
	TransitionDelay TransitionDelayConfiguration `json:"transitionDelay,omitempty"`
}

ClusterSizingConfigurationSpec defines the desired state of ClusterSizingConfiguration

func (*ClusterSizingConfigurationSpec) DeepCopy

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

func (*ClusterSizingConfigurationSpec) DeepCopyInto

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

type ClusterSizingConfigurationStatus

type ClusterSizingConfigurationStatus struct {

	// Conditions contain details about the various aspects of cluster sizing.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

ClusterSizingConfigurationStatus defines the observed state of ClusterSizingConfiguration

func (*ClusterSizingConfigurationStatus) DeepCopy

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

func (*ClusterSizingConfigurationStatus) DeepCopyInto

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

type ConcurrencyConfiguration

type ConcurrencyConfiguration struct {

	// SlidingWindow is the window over which the concurrency bound is enforced.
	SlidingWindow metav1.Duration `json:"slidingWindow,omitempty"`

	// Limit is the maximum allowed number of cluster size transitions during the sliding window.
	Limit int32 `json:"limit,omitempty"`
}

ConcurrencyConfiguration defines bounds for the concurrency of clusters transitioning between states.

func (*ConcurrencyConfiguration) DeepCopy

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

func (*ConcurrencyConfiguration) DeepCopyInto

func (in *ConcurrencyConfiguration) DeepCopyInto(out *ConcurrencyConfiguration)

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

type Effects

type Effects struct {

	// KASGoMemLimit is the value to set for the $GOMEMLIMIT of the Kube APIServer container
	KASGoMemLimit *resource.Quantity `json:"kasGoMemLimit,omitempty"`

	// ControlPlanePriorityClassName is the priority class to use for most control plane pods
	ControlPlanePriorityClassName *string `json:"controlPlanePriorityClassName,omitempty"`

	// EtcdPriorityClassName is the priority class to use for etcd pods
	EtcdPriorityClassName *string `json:"etcdPriorityClassName,omitempty"`

	// APICriticalPriorityClassName is the priority class for pods in the API request serving path.
	// This includes Kube API Server, OpenShift APIServer, etc.
	APICriticalPriorityClassName *string `json:"APICriticalPriorityClassName,omitempty"`

	// +kubebuilder:validation:Optional
	// ResourceRequests allows specifying resource requests for control plane pods.
	ResourceRequests []ResourceRequest `json:"resourceRequests,omitempty"`
}

Effects configures the effects on a cluster considered part of a t-shirt size class.

func (*Effects) DeepCopy

func (in *Effects) DeepCopy() *Effects

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

func (*Effects) DeepCopyInto

func (in *Effects) DeepCopyInto(out *Effects)

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

type Management

type Management struct {

	// Placeholders configures the number of dummy workloads that will be scheduled irrespective of
	// HostedClusters in order to keep a set of nodes ready to accept new cluster creation and scheduling.
	Placeholders int `json:"placeholders,omitempty"`
}

Management configures behaviors of the management plane for a size class.

func (*Management) DeepCopy

func (in *Management) DeepCopy() *Management

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

func (*Management) DeepCopyInto

func (in *Management) DeepCopyInto(out *Management)

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

type NodeCountCriteria

type NodeCountCriteria struct {

	// From is the inclusive lower limit to node count for a cluster to be considered a particular size.
	From uint32 `json:"from"`

	// To is the inclusive upper limit to node count for a cluster to be considered a particular size.
	// If unset, this size class will match clusters of all sizes greater than the lower limit.
	To *uint32 `json:"to,omitempty"`
}

NodeCountCriteria defines the criteria based on node count for a cluster to have a t-shirt size.

func (*NodeCountCriteria) DeepCopy

func (in *NodeCountCriteria) DeepCopy() *NodeCountCriteria

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

func (*NodeCountCriteria) DeepCopyInto

func (in *NodeCountCriteria) DeepCopyInto(out *NodeCountCriteria)

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

type ResourceRequest

type ResourceRequest struct {
	// +kubebuilder:validation:Required
	// DeploymentName is the name of the deployment to which the resource request applies.
	DeploymentName string `json:"deploymentName"`

	// +kubebuilder:validation:Required
	// ContainerName is the name of the container to which the resource request applies.
	ContainerName string `json:"containerName"`

	// +kubebuilder:validation:Optional
	// Memory is the amount of memory to request for the container.
	Memory *resource.Quantity `json:"memory,omitempty"`

	// +kubebuilder:validation:Optional
	// CPU is the amount of CPU to request for the container.
	CPU *resource.Quantity `json:"cpu,omitempty"`
}

func (*ResourceRequest) DeepCopy

func (in *ResourceRequest) DeepCopy() *ResourceRequest

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

func (*ResourceRequest) DeepCopyInto

func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest)

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

type SizeConfiguration

type SizeConfiguration struct {

	// Name is the t-shirt size name.
	Name string `json:"name"`

	// Criteria defines the node count range for clusters to fall into this t-shirt size class.
	Criteria NodeCountCriteria `json:"criteria"`

	// Effects define the effects on a cluster being considered part of this t-shirt size class.
	Effects *Effects `json:"effects,omitempty"`

	// Management configures the management aspects of this size class on the management plane.
	Management *Management `json:"management,omitempty"`
}

SizeConfiguration holds options for clusters of a given size.

func (*SizeConfiguration) DeepCopy

func (in *SizeConfiguration) DeepCopy() *SizeConfiguration

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

func (*SizeConfiguration) DeepCopyInto

func (in *SizeConfiguration) DeepCopyInto(out *SizeConfiguration)

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

type TransitionDelayConfiguration

type TransitionDelayConfiguration struct {

	// Increase defines the minimum period of time to wait between a cluster's size increasing and
	// the t-shirt size assigned to it being updated to reflect the new size.
	Increase metav1.Duration `json:"increase,omitempty"`

	// Decrease defines the minimum period of time to wait between a cluster's size decreasing and
	// the t-shirt size assigned to it being updated to reflect the new size.
	Decrease metav1.Duration `json:"decrease,omitempty"`
}

TransitionDelayConfiguration defines the lag between cluster size changing and the assigned t-shirt size class being applied.

func (*TransitionDelayConfiguration) DeepCopy

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

func (*TransitionDelayConfiguration) DeepCopyInto

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