provreqwrapper

package
v0.0.0-...-29ce5d4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTestPods

func BuildTestPods(namespace, name string, podCount int) []*apiv1.Pod

BuildTestPods builds a list of pod objects for use as existing unschedulable pods in tests.

Types

type PodSet

type PodSet struct {
	// Count number of pods with given template.
	Count int32
	// PodTemplate template of given pod set.
	PodTemplate apiv1.PodTemplateSpec
}

PodSet wrapper representation of the PodSet.

type ProvisioningRequest

type ProvisioningRequest struct {
	*v1.ProvisioningRequest
	PodTemplates []*apiv1.PodTemplate
}

ProvisioningRequest wrapper representation of the ProvisioningRequest

func BuildTestProvisioningRequest

func BuildTestProvisioningRequest(namespace, name, cpu, memory, gpu string, podCount int32,
	antiAffinity bool, creationTimestamp time.Time, class string) *ProvisioningRequest

BuildTestProvisioningRequest builds ProvisioningRequest wrapper.

func BuildValidTestProvisioningRequestFromOptions

func BuildValidTestProvisioningRequestFromOptions(o TestProvReqOptions) *ProvisioningRequest

BuildValidTestProvisioningRequestFromOptions fills in commonly omitted fields to generate a valid ProvisioningRequest object. Simplifies test code.

func NewProvisioningRequest

func NewProvisioningRequest(pr *v1.ProvisioningRequest, podTemplates []*apiv1.PodTemplate) *ProvisioningRequest

NewProvisioningRequest creates new ProvisioningRequest based on v1 CR.

func (*ProvisioningRequest) CopyWithParameters

func (pr *ProvisioningRequest) CopyWithParameters(params map[string]v1.Parameter) *ProvisioningRequest

CopyWithParameters makes a deep copy of embedded ProvReq and sets its CopyWithParameters

func (*ProvisioningRequest) PodSets

func (pr *ProvisioningRequest) PodSets() ([]PodSet, error)

PodSets of the Provisioning Request.

func (*ProvisioningRequest) SetConditions

func (pr *ProvisioningRequest) SetConditions(conditions []metav1.Condition)

SetConditions of the Provisioning Request.

type TestProvReqOptions

type TestProvReqOptions struct {
	Namespace         string
	Name              string
	CPU               string
	Memory            string
	GPU               string
	PodCount          int32
	AntiAffinity      bool
	CreationTimestamp time.Time
	Class             string
}

TestProvReqOptions is a helper struct to make constructing test ProvisioningRequest object easier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL