provreqclient

package
v0.0.0-...-da31dff Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterOutProvisioningClass

func FilterOutProvisioningClass(prList []*provreqwrapper.ProvisioningRequest, class string) []*provreqwrapper.ProvisioningRequest

FilterOutProvisioningClass filters out ProvReqs that belongs to certain Provisioning Class

func ProvisioningRequestWrapperForTesting

func ProvisioningRequestWrapperForTesting(namespace, name string) *provreqwrapper.ProvisioningRequest

ProvisioningRequestWrapperForTesting mock ProvisioningRequest for tests.

func ProvisioningRequestsForPods

func ProvisioningRequestsForPods(client *ProvisioningRequestClient, unschedulablePods []*apiv1.Pod) []*provreqwrapper.ProvisioningRequest

ProvisioningRequestsForPods check that all pods belong to one ProvisioningRequest and return it.

Types

type ProvisioningRequestClient

type ProvisioningRequestClient struct {
	// contains filtered or unexported fields
}

ProvisioningRequestClient represents client for v1 ProvReq CRD.

func NewFakeProvisioningRequestClient

func NewFakeProvisioningRequestClient(ctx context.Context, t *testing.T, prs ...*provreqwrapper.ProvisioningRequest) *ProvisioningRequestClient

NewFakeProvisioningRequestClient mock ProvisioningRequestClient for tests.

func NewProvisioningRequestClient

func NewProvisioningRequestClient(kubeConfig *rest.Config) (*ProvisioningRequestClient, error)

NewProvisioningRequestClient configures and returns a provisioningRequestClient.

func (*ProvisioningRequestClient) DeleteProvisioningRequest

func (c *ProvisioningRequestClient) DeleteProvisioningRequest(pr *v1.ProvisioningRequest) error

DeleteProvisioningRequest deletes the given ProvisioningRequest CR using the ProvisioningRequestInterface and returns an error in case of failure.

func (*ProvisioningRequestClient) FetchPodTemplates

func (c *ProvisioningRequestClient) FetchPodTemplates(pr *v1.ProvisioningRequest) ([]*apiv1.PodTemplate, error)

FetchPodTemplates fetches PodTemplates referenced by the Provisioning Request.

func (*ProvisioningRequestClient) ProvisioningRequest

func (c *ProvisioningRequestClient) ProvisioningRequest(namespace, name string) (*provreqwrapper.ProvisioningRequest, error)

ProvisioningRequest gets a specific ProvisioningRequest CR.

func (*ProvisioningRequestClient) ProvisioningRequestNoCache

func (c *ProvisioningRequestClient) ProvisioningRequestNoCache(namespace, name string) (*provreqwrapper.ProvisioningRequest, error)

ProvisioningRequestNoCache returns ProvisioningRequest directly from client. For test purposes only.

func (*ProvisioningRequestClient) ProvisioningRequests

func (c *ProvisioningRequestClient) ProvisioningRequests() ([]*provreqwrapper.ProvisioningRequest, error)

ProvisioningRequests gets all ProvisioningRequest CRs.

func (*ProvisioningRequestClient) ProvisioningRequestsNoCache

func (c *ProvisioningRequestClient) ProvisioningRequestsNoCache() ([]*provreqwrapper.ProvisioningRequest, error)

ProvisioningRequestsNoCache returns all ProvisioningRequests directly from client. For test purposes only.

func (*ProvisioningRequestClient) UpdateProvisioningRequest

func (c *ProvisioningRequestClient) UpdateProvisioningRequest(pr *v1.ProvisioningRequest) (*v1.ProvisioningRequest, error)

UpdateProvisioningRequest updates the given ProvisioningRequest CR by propagating the changes using the ProvisioningRequestInterface and returns the updated instance or the original one in case of an error.

Jump to

Keyboard shortcuts

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