Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta +groupName=node.k8s.appscode.com
Index ¶
Constants ¶
const ( ResourceKindNodeTopology = "NodeTopology" ResourceNodeTopology = "nodetopology" ResourceNodeTopologies = "nodetopologies" )
Variables ¶
var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: node.GroupName, Version: "v1alpha1"}
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type NodeGroup ¶
type NodeGroup struct { TopologyValue string `json:"topologyValue"` // Allocatable represents the total resources of a node. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity // Deprecated: Use resources instead. // +optional Allocatable core.ResourceList `json:"allocatable,omitempty"` // Resources represents the requested and limited resources of a machine type. // +optional Resources core.ResourceRequirements `json:"resources,omitempty"` // Cost is the cost of the running an ondeamd machine for a month // +optional Cost *ResourceCost `json:"cost,omitempty"` }
func (*NodeGroup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroup.
func (*NodeGroup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSelectionPolicy ¶
type NodeSelectionPolicy string
const ( NodeSelectionPolicyLabelSelector NodeSelectionPolicy = "LabelSelector" NodeSelectionPolicyTaint NodeSelectionPolicy = "Taint" )
type NodeTopology ¶
type NodeTopology struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodeTopologySpec `json:"spec,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:path=nodetopologies,singular=nodetopology,scope=Cluster +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (NodeTopology) CustomResourceDefinition ¶
func (v NodeTopology) CustomResourceDefinition() *apiextensions.CustomResourceDefinition
func (*NodeTopology) DeepCopy ¶
func (in *NodeTopology) DeepCopy() *NodeTopology
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTopology.
func (*NodeTopology) DeepCopyInto ¶
func (in *NodeTopology) DeepCopyInto(out *NodeTopology)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeTopology) DeepCopyObject ¶
func (in *NodeTopology) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeTopologyList ¶
type NodeTopologyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NodeTopology `json:"items,omitempty"` }
func (*NodeTopologyList) DeepCopy ¶
func (in *NodeTopologyList) DeepCopy() *NodeTopologyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTopologyList.
func (*NodeTopologyList) DeepCopyInto ¶
func (in *NodeTopologyList) DeepCopyInto(out *NodeTopologyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeTopologyList) DeepCopyObject ¶
func (in *NodeTopologyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeTopologySpec ¶
type NodeTopologySpec struct { // +optional Description string `json:"description"` // +optional NodeSelectionPolicy NodeSelectionPolicy `json:"nodeSelectionPolicy,omitempty"` TopologyKey string `json:"topologyKey"` NodeGroups []NodeGroup `json:"nodeGroups,omitempty"` // Requirements are layered with GetLabels and applied to every node. // +kubebuilder:validation:XValidation:message="requirements with operator 'In' must have a value defined",rule="self.all(x, x.operator == 'In' ? x.values.size() != 0 : true)" // +kubebuilder:validation:XValidation:message="requirements operator 'Gt' or 'Lt' must have a single positive integer value",rule="self.all(x, (x.operator == 'Gt' || x.operator == 'Lt') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)" // +kubebuilder:validation:MaxItems:=30 // +optional Requirements []core.NodeSelectorRequirement `json:"requirements,omitempty" hash:"ignore"` }
func (*NodeTopologySpec) DeepCopy ¶
func (in *NodeTopologySpec) DeepCopy() *NodeTopologySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTopologySpec.
func (*NodeTopologySpec) DeepCopyInto ¶
func (in *NodeTopologySpec) DeepCopyInto(out *NodeTopologySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceCost ¶ added in v0.18.8
func (*ResourceCost) DeepCopy ¶ added in v0.18.8
func (in *ResourceCost) DeepCopy() *ResourceCost
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceCost.
func (*ResourceCost) DeepCopyInto ¶ added in v0.18.8
func (in *ResourceCost) DeepCopyInto(out *ResourceCost)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.