Documentation ¶
Index ¶
- Constants
- func MakeNodeWithLabels(node string, milliCPU, memory, pods, ephemeralStorage int64, ...) *corev1.Node
- func MakeNodeWithTaints(node string, milliCPU, memory, pods, ephemeralStorage int64, ...) *corev1.Node
- func NewCustomResource(apiVersion, kind, namespace, name string) *unstructured.Unstructured
- func NewCustomResourceDefinition(group string, specNames apiextensionsv1.CustomResourceDefinitionNames, ...) *apiextensionsv1.CustomResourceDefinition
- func NewDeployment(namespace string, name string) *appsv1.Deployment
- func NewJob(namespace string, name string) *batchv1.Job
- func NewNode(node string, milliCPU, memory, pods, ephemeralStorage int64) *corev1.Node
- func NewPod(namespace string, name string) *corev1.Pod
- func NewPodWithRequest(pod, node string, milliCPU, memory, ephemeralStorage int64) *corev1.Pod
- func NewResourceList(milliCPU, memory, ephemeralStorage int64) corev1.ResourceList
- func NewService(namespace string, name string) *corev1.Service
Constants ¶
View Source
const ( ResourceUnitZero int64 = 0 ResourceUnitCPU int64 = 1000 ResourceUnitMem int64 = 1024 * 1024 * 1024 ResourceUnitPod int64 = 1 ResourceUnitEphemeralStorage int64 = 1024 * 1024 * 1024 ResourceUnitGPU int64 = 1 )
These are different resource units.
Variables ¶
This section is empty.
Functions ¶
func MakeNodeWithLabels ¶
func MakeNodeWithLabels(node string, milliCPU, memory, pods, ephemeralStorage int64, labels map[string]string) *corev1.Node
MakeNodeWithLabels will build a ready node with resource and labels.
func MakeNodeWithTaints ¶
func MakeNodeWithTaints(node string, milliCPU, memory, pods, ephemeralStorage int64, taints []corev1.Taint) *corev1.Node
MakeNodeWithTaints will build a ready node with resource and taints.
func NewCustomResource ¶
func NewCustomResource(apiVersion, kind, namespace, name string) *unstructured.Unstructured
NewCustomResource will build a CR object with CRD Foo.
func NewCustomResourceDefinition ¶
func NewCustomResourceDefinition(group string, specNames apiextensionsv1.CustomResourceDefinitionNames, scope apiextensionsv1.ResourceScope) *apiextensionsv1.CustomResourceDefinition
NewCustomResourceDefinition will build a CRD object.
func NewDeployment ¶
func NewDeployment(namespace string, name string) *appsv1.Deployment
NewDeployment will build a deployment object.
func NewPodWithRequest ¶
NewPodWithRequest will build a Pod with resource request.
func NewResourceList ¶
func NewResourceList(milliCPU, memory, ephemeralStorage int64) corev1.ResourceList
NewResourceList will build a ResourceList.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.