Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=scheduling.hypershift.openshift.io +k8s:openapi-gen=true
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type ClusterSizingConfiguration
- type ClusterSizingConfigurationList
- type ClusterSizingConfigurationSpec
- type ClusterSizingConfigurationStatus
- type ConcurrencyConfiguration
- type Effects
- type Management
- type NodeCountCriteria
- type ResourceRequest
- type SizeConfiguration
- type TransitionDelayConfiguration
Constants ¶
const (
ClusterSizingConfigurationValidType = "ClusterSizingConfigurationValid"
)
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: scheduling.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
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 ¶
func (in *ClusterSizingConfiguration) DeepCopy() *ClusterSizingConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSizingConfiguration.
func (*ClusterSizingConfiguration) DeepCopyInto ¶
func (in *ClusterSizingConfiguration) DeepCopyInto(out *ClusterSizingConfiguration)
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 ¶
func (in *ClusterSizingConfigurationList) DeepCopy() *ClusterSizingConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSizingConfigurationList.
func (*ClusterSizingConfigurationList) DeepCopyInto ¶
func (in *ClusterSizingConfigurationList) DeepCopyInto(out *ClusterSizingConfigurationList)
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. // These limits do not apply to new clusters entering the fleet. // 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"` // NonRequestServingNodesBufferPerZone is the number of extra nodes to allocate for non request serving // workloads per zone. NonRequestServingNodesBufferPerZone *resource.Quantity `json:"nonRequestServingNodesBufferPerZone,omitempty"` }
ClusterSizingConfigurationSpec defines the desired state of ClusterSizingConfiguration
func (*ClusterSizingConfigurationSpec) DeepCopy ¶
func (in *ClusterSizingConfigurationSpec) DeepCopy() *ClusterSizingConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSizingConfigurationSpec.
func (*ClusterSizingConfigurationSpec) DeepCopyInto ¶
func (in *ClusterSizingConfigurationSpec) DeepCopyInto(out *ClusterSizingConfigurationSpec)
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 ¶
func (in *ClusterSizingConfigurationStatus) DeepCopy() *ClusterSizingConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSizingConfigurationStatus.
func (*ClusterSizingConfigurationStatus) DeepCopyInto ¶
func (in *ClusterSizingConfigurationStatus) DeepCopyInto(out *ClusterSizingConfigurationStatus)
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 ¶
func (in *ConcurrencyConfiguration) DeepCopy() *ConcurrencyConfiguration
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"` // +kubebuilder:validation:Optional // MachineHealthCheckTimeout specifies an optional timeout for machinehealthchecks created // for HostedClusters with this specific size. MachineHealthCheckTimeout *metav1.Duration `json:"machineHealthCheckTimeout,omitempty"` // +kubebuilder:validation:Optional // MaximumRequestsInFlight specifies the maximum requests in flight for Kube APIServer MaximumRequestsInflight *int `json:"maximumRequestsInflight,omitempty"` // +kubebuilder:validation:Optional // MaximumMutatingRequestsInflight specifies the maximum mutating requests in flight for Kube APIServer MaximumMutatingRequestsInflight *int `json:"maximumMutatingRequestsInflight,omitempty"` }
Effects configures the effects on a cluster considered part of a t-shirt size class.
func (*Effects) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Effects.
func (*Effects) DeepCopyInto ¶
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"` // NonRequestServingNodesPerZone is the number of nodes to allocate for non request serving workloads // per HostedCluster. This will likely be a fraction of a node (ie. 0.2) to allow 5 HostedClusters in // a single node. The total number of nodes needed per HostedCluster is this number multiplied by 3 // (number of zones). NonRequestServingNodesPerZone *resource.Quantity `json:"nonRequestServingNodesPerZone,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 ¶
func (in *TransitionDelayConfiguration) DeepCopy() *TransitionDelayConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransitionDelayConfiguration.
func (*TransitionDelayConfiguration) DeepCopyInto ¶
func (in *TransitionDelayConfiguration) DeepCopyInto(out *TransitionDelayConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.