core

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobFailed = errors.New("job failed")

ErrJobFailed is returned by WaitForJobCompletion when the Job reaches a Failed terminal state. It is distinct from a timeout (the Job never finished) so callers can tell the two apart. It is a plain sentinel (not trace.Errorf) so that errors.Is still matches it through a trace.Wrap.

Functions

func ContainerPortToServicePort

func ContainerPortToServicePort(containerPort corev1.ContainerPort) corev1.ServicePort

func ConvertSingleContainerVolumes added in v0.0.6

func ConvertSingleContainerVolumes(scvs []SingleContainerVolume) ([]corev1.Volume, []corev1.VolumeMount)

TODO replace this with a new, more generic approach Converts SCVs into k8s volumes and volume mounts. If multiple SCVs have the same name, they are merged. This prevents issues with certain CSIs that don't support the same volume being listed multiple times under different names.

func PrivilegedContainerSecurityContext

func PrivilegedContainerSecurityContext() *corev1.SecurityContext

func PrivilegedPodSecurityContext

func PrivilegedPodSecurityContext() *corev1.PodSecurityContext

func RestrictedContainerSecurityContext

func RestrictedContainerSecurityContext(uid, gid int64) *corev1.SecurityContext

func RestrictedPodSecurityContext

func RestrictedPodSecurityContext(uid, gid int64) *corev1.PodSecurityContext

Types

type Client

type Client struct {
	helpers.SimpleResourceLabeler
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *rest.Config) (*Client, error)

func (*Client) CreatePVC

func (c *Client) CreatePVC(ctx *contexts.Context, namespace, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*corev1.PersistentVolumeClaim, error)

func (*Client) CreatePod

func (c *Client) CreatePod(ctx *contexts.Context, namespace string, pod *corev1.Pod) (*corev1.Pod, error)

func (*Client) CreateService

func (c *Client) CreateService(ctx *contexts.Context, namespce string, service *corev1.Service) (*corev1.Service, error)

func (*Client) DeletePVC

func (c *Client) DeletePVC(ctx *contexts.Context, namespace, volumeName string) error

func (*Client) DeletePod

func (c *Client) DeletePod(ctx *contexts.Context, namespace, name string) error

func (*Client) DeleteService

func (c *Client) DeleteService(ctx *contexts.Context, namespace, name string) error

func (*Client) DoesPVCExist

func (c *Client) DoesPVCExist(ctx *contexts.Context, namespace, name string) (doesExist bool, err error)

func (*Client) EnsurePVCExists

func (c *Client) EnsurePVCExists(ctx *contexts.Context, namespace, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*corev1.PersistentVolumeClaim, error)

func (*Client) ExecInPod added in v0.0.14

func (c *Client) ExecInPod(ctx *contexts.Context, namespace, podName, container string, command []string, stdin io.Reader) (string, string, error)

ExecInPod runs command in a container of an existing pod and returns its stdout and stderr. It is the in-cluster equivalent of `kubectl exec`: it streams over SPDY using the rest config, so it does not require credentials, a Service, or pod-network reachability to the workload. It is used to run psql against a CNPG primary over the pod's local socket (authenticating as the in-pod superuser) without issuing client certificates.

func (*Client) GetEndpoint

func (c *Client) GetEndpoint(ctx *contexts.Context, namespace, name string) (*discoveryv1.EndpointSlice, error)

func (*Client) GetPVC

func (kc *Client) GetPVC(ctx *contexts.Context, namespace, name string) (*corev1.PersistentVolumeClaim, error)

func (*Client) WaitForJobCompletion added in v0.0.13

func (c *Client) WaitForJobCompletion(ctx *contexts.Context, namespace, name string, opts WaitForJobCompletionOpts) (job *batchv1.Job, err error)

WaitForJobCompletion watches (rather than polls) for a Job to complete, returning it once it does. If the Job reaches a Failed terminal state instead, it returns ErrJobFailed; if it never finishes, it returns a timeout error. The Job is selected by name, or by opts.LabelSelector when its name isn't known ahead of time. A failed Job is reported even if it is subsequently garbage collected, since the delete watch event still carries the Job's final state.

func (*Client) WaitForReadyEndpoint

func (c *Client) WaitForReadyEndpoint(ctx *contexts.Context, namespace, name string, opts WaitForReadyEndpointOpts) (endpoints *discoveryv1.EndpointSlice, err error)

Wait for at least one ready endpoint to be available.

func (*Client) WaitForReadyPod

func (c *Client) WaitForReadyPod(ctx *contexts.Context, namespace, name string, opts WaitForReadyPodOpts) (pod *corev1.Pod, err error)

func (*Client) WaitForReadyService

func (c *Client) WaitForReadyService(ctx *contexts.Context, namespace, name string, opts WaitForReadyServiceOpts) (service *corev1.Service, err error)

type ClientInterface

type ClientInterface interface {
	helpers.ResourceLabeler
	// Pods
	CreatePod(ctx *contexts.Context, namespace string, pod *corev1.Pod) (*corev1.Pod, error) // TODO see if this can be refined further
	WaitForReadyPod(ctx *contexts.Context, namespace, name string, opts WaitForReadyPodOpts) (*corev1.Pod, error)
	DeletePod(ctx *contexts.Context, namespace, name string) error
	ExecInPod(ctx *contexts.Context, namespace, podName, container string, command []string, stdin io.Reader) (stdout, stderr string, err error)
	// Jobs
	WaitForJobCompletion(ctx *contexts.Context, namespace, name string, opts WaitForJobCompletionOpts) (*batchv1.Job, error)
	// PVCs
	CreatePVC(ctx *contexts.Context, namespace, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*corev1.PersistentVolumeClaim, error)
	GetPVC(ctx *contexts.Context, namespace, name string) (*corev1.PersistentVolumeClaim, error)
	DoesPVCExist(ctx *contexts.Context, namespace, name string) (bool, error)
	EnsurePVCExists(ctx *contexts.Context, namespace, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*corev1.PersistentVolumeClaim, error)
	DeletePVC(ctx *contexts.Context, namespace, volumeName string) error
	// Services
	CreateService(ctx *contexts.Context, namespce string, service *corev1.Service) (*corev1.Service, error)
	WaitForReadyService(ctx *contexts.Context, namespace, name string, opts WaitForReadyServiceOpts) (*corev1.Service, error)
	DeleteService(ctx *contexts.Context, namespace, name string) error
	// Endpoints
	GetEndpoint(ctx *contexts.Context, namespace, name string) (*discoveryv1.EndpointSlice, error)
	WaitForReadyEndpoint(ctx *contexts.Context, namespace, name string, opts WaitForReadyEndpointOpts) (*discoveryv1.EndpointSlice, error)
}

type CreatePVCOptions

type CreatePVCOptions struct {
	helpers.GenerateName
	StorageClassName string
	Source           *corev1.TypedObjectReference
}

type MockClientInterface

type MockClientInterface struct {
	mock.Mock
}

MockClientInterface is an autogenerated mock type for the ClientInterface type

func NewMockClientInterface

func NewMockClientInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClientInterface

NewMockClientInterface creates a new instance of MockClientInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClientInterface) CreatePVC

func (_m *MockClientInterface) CreatePVC(ctx *contexts.Context, namespace string, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*v1.PersistentVolumeClaim, error)

CreatePVC provides a mock function with given fields: ctx, namespace, pvcName, size, opts

func (*MockClientInterface) CreatePod

func (_m *MockClientInterface) CreatePod(ctx *contexts.Context, namespace string, pod *v1.Pod) (*v1.Pod, error)

CreatePod provides a mock function with given fields: ctx, namespace, pod

func (*MockClientInterface) CreateService

func (_m *MockClientInterface) CreateService(ctx *contexts.Context, namespce string, service *v1.Service) (*v1.Service, error)

CreateService provides a mock function with given fields: ctx, namespce, service

func (*MockClientInterface) DeletePVC

func (_m *MockClientInterface) DeletePVC(ctx *contexts.Context, namespace string, volumeName string) error

DeletePVC provides a mock function with given fields: ctx, namespace, volumeName

func (*MockClientInterface) DeletePod

func (_m *MockClientInterface) DeletePod(ctx *contexts.Context, namespace string, name string) error

DeletePod provides a mock function with given fields: ctx, namespace, name

func (*MockClientInterface) DeleteService

func (_m *MockClientInterface) DeleteService(ctx *contexts.Context, namespace string, name string) error

DeleteService provides a mock function with given fields: ctx, namespace, name

func (*MockClientInterface) DoesPVCExist

func (_m *MockClientInterface) DoesPVCExist(ctx *contexts.Context, namespace string, name string) (bool, error)

DoesPVCExist provides a mock function with given fields: ctx, namespace, name

func (*MockClientInterface) EXPECT

func (*MockClientInterface) EnsurePVCExists

func (_m *MockClientInterface) EnsurePVCExists(ctx *contexts.Context, namespace string, pvcName string, size resource.Quantity, opts CreatePVCOptions) (*v1.PersistentVolumeClaim, error)

EnsurePVCExists provides a mock function with given fields: ctx, namespace, pvcName, size, opts

func (*MockClientInterface) ExecInPod added in v0.0.14

func (_m *MockClientInterface) ExecInPod(ctx *contexts.Context, namespace string, podName string, container string, command []string, stdin io.Reader) (string, string, error)

ExecInPod provides a mock function with given fields: ctx, namespace, podName, container, command, stdin

func (*MockClientInterface) GetEndpoint

func (_m *MockClientInterface) GetEndpoint(ctx *contexts.Context, namespace string, name string) (*discoveryv1.EndpointSlice, error)

GetEndpoint provides a mock function with given fields: ctx, namespace, name

func (*MockClientInterface) GetPVC

func (_m *MockClientInterface) GetPVC(ctx *contexts.Context, namespace string, name string) (*v1.PersistentVolumeClaim, error)

GetPVC provides a mock function with given fields: ctx, namespace, name

func (*MockClientInterface) SetCommonLabels added in v0.0.9

func (_m *MockClientInterface) SetCommonLabels(labels map[string]string)

SetCommonLabels provides a mock function with given fields: labels

func (*MockClientInterface) WaitForJobCompletion added in v0.0.13

func (_m *MockClientInterface) WaitForJobCompletion(ctx *contexts.Context, namespace string, name string, opts WaitForJobCompletionOpts) (*batchv1.Job, error)

WaitForJobCompletion provides a mock function with given fields: ctx, namespace, name, opts

func (*MockClientInterface) WaitForReadyEndpoint

func (_m *MockClientInterface) WaitForReadyEndpoint(ctx *contexts.Context, namespace string, name string, opts WaitForReadyEndpointOpts) (*discoveryv1.EndpointSlice, error)

WaitForReadyEndpoint provides a mock function with given fields: ctx, namespace, name, opts

func (*MockClientInterface) WaitForReadyPod

func (_m *MockClientInterface) WaitForReadyPod(ctx *contexts.Context, namespace string, name string, opts WaitForReadyPodOpts) (*v1.Pod, error)

WaitForReadyPod provides a mock function with given fields: ctx, namespace, name, opts

func (*MockClientInterface) WaitForReadyService

func (_m *MockClientInterface) WaitForReadyService(ctx *contexts.Context, namespace string, name string, opts WaitForReadyServiceOpts) (*v1.Service, error)

WaitForReadyService provides a mock function with given fields: ctx, namespace, name, opts

type MockClientInterface_CreatePVC_Call

type MockClientInterface_CreatePVC_Call struct {
	*mock.Call
}

MockClientInterface_CreatePVC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePVC'

func (*MockClientInterface_CreatePVC_Call) Return

func (*MockClientInterface_CreatePVC_Call) Run

type MockClientInterface_CreatePod_Call

type MockClientInterface_CreatePod_Call struct {
	*mock.Call
}

MockClientInterface_CreatePod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePod'

func (*MockClientInterface_CreatePod_Call) Return

func (*MockClientInterface_CreatePod_Call) Run

func (*MockClientInterface_CreatePod_Call) RunAndReturn

type MockClientInterface_CreateService_Call

type MockClientInterface_CreateService_Call struct {
	*mock.Call
}

MockClientInterface_CreateService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateService'

func (*MockClientInterface_CreateService_Call) Return

func (*MockClientInterface_CreateService_Call) Run

func (*MockClientInterface_CreateService_Call) RunAndReturn

type MockClientInterface_DeletePVC_Call

type MockClientInterface_DeletePVC_Call struct {
	*mock.Call
}

MockClientInterface_DeletePVC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePVC'

func (*MockClientInterface_DeletePVC_Call) Return

func (*MockClientInterface_DeletePVC_Call) Run

func (*MockClientInterface_DeletePVC_Call) RunAndReturn

type MockClientInterface_DeletePod_Call

type MockClientInterface_DeletePod_Call struct {
	*mock.Call
}

MockClientInterface_DeletePod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePod'

func (*MockClientInterface_DeletePod_Call) Return

func (*MockClientInterface_DeletePod_Call) Run

func (*MockClientInterface_DeletePod_Call) RunAndReturn

type MockClientInterface_DeleteService_Call

type MockClientInterface_DeleteService_Call struct {
	*mock.Call
}

MockClientInterface_DeleteService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteService'

func (*MockClientInterface_DeleteService_Call) Return

func (*MockClientInterface_DeleteService_Call) Run

func (*MockClientInterface_DeleteService_Call) RunAndReturn

type MockClientInterface_DoesPVCExist_Call

type MockClientInterface_DoesPVCExist_Call struct {
	*mock.Call
}

MockClientInterface_DoesPVCExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoesPVCExist'

func (*MockClientInterface_DoesPVCExist_Call) Return

func (*MockClientInterface_DoesPVCExist_Call) Run

func (*MockClientInterface_DoesPVCExist_Call) RunAndReturn

type MockClientInterface_EnsurePVCExists_Call

type MockClientInterface_EnsurePVCExists_Call struct {
	*mock.Call
}

MockClientInterface_EnsurePVCExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsurePVCExists'

func (*MockClientInterface_EnsurePVCExists_Call) Return

func (*MockClientInterface_EnsurePVCExists_Call) Run

type MockClientInterface_ExecInPod_Call added in v0.0.14

type MockClientInterface_ExecInPod_Call struct {
	*mock.Call
}

MockClientInterface_ExecInPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecInPod'

func (*MockClientInterface_ExecInPod_Call) Return added in v0.0.14

func (*MockClientInterface_ExecInPod_Call) Run added in v0.0.14

func (_c *MockClientInterface_ExecInPod_Call) Run(run func(ctx *contexts.Context, namespace string, podName string, container string, command []string, stdin io.Reader)) *MockClientInterface_ExecInPod_Call

func (*MockClientInterface_ExecInPod_Call) RunAndReturn added in v0.0.14

type MockClientInterface_Expecter

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

func (*MockClientInterface_Expecter) CreatePVC

func (_e *MockClientInterface_Expecter) CreatePVC(ctx interface{}, namespace interface{}, pvcName interface{}, size interface{}, opts interface{}) *MockClientInterface_CreatePVC_Call

CreatePVC is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • pvcName string
  • size resource.Quantity
  • opts CreatePVCOptions

func (*MockClientInterface_Expecter) CreatePod

func (_e *MockClientInterface_Expecter) CreatePod(ctx interface{}, namespace interface{}, pod interface{}) *MockClientInterface_CreatePod_Call

CreatePod is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • pod *v1.Pod

func (*MockClientInterface_Expecter) CreateService

func (_e *MockClientInterface_Expecter) CreateService(ctx interface{}, namespce interface{}, service interface{}) *MockClientInterface_CreateService_Call

CreateService is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespce string
  • service *v1.Service

func (*MockClientInterface_Expecter) DeletePVC

func (_e *MockClientInterface_Expecter) DeletePVC(ctx interface{}, namespace interface{}, volumeName interface{}) *MockClientInterface_DeletePVC_Call

DeletePVC is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • volumeName string

func (*MockClientInterface_Expecter) DeletePod

func (_e *MockClientInterface_Expecter) DeletePod(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeletePod_Call

DeletePod is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string

func (*MockClientInterface_Expecter) DeleteService

func (_e *MockClientInterface_Expecter) DeleteService(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeleteService_Call

DeleteService is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string

func (*MockClientInterface_Expecter) DoesPVCExist

func (_e *MockClientInterface_Expecter) DoesPVCExist(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DoesPVCExist_Call

DoesPVCExist is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string

func (*MockClientInterface_Expecter) EnsurePVCExists

func (_e *MockClientInterface_Expecter) EnsurePVCExists(ctx interface{}, namespace interface{}, pvcName interface{}, size interface{}, opts interface{}) *MockClientInterface_EnsurePVCExists_Call

EnsurePVCExists is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • pvcName string
  • size resource.Quantity
  • opts CreatePVCOptions

func (*MockClientInterface_Expecter) ExecInPod added in v0.0.14

func (_e *MockClientInterface_Expecter) ExecInPod(ctx interface{}, namespace interface{}, podName interface{}, container interface{}, command interface{}, stdin interface{}) *MockClientInterface_ExecInPod_Call

ExecInPod is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • podName string
  • container string
  • command []string
  • stdin io.Reader

func (*MockClientInterface_Expecter) GetEndpoint

func (_e *MockClientInterface_Expecter) GetEndpoint(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_GetEndpoint_Call

GetEndpoint is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string

func (*MockClientInterface_Expecter) GetPVC

func (_e *MockClientInterface_Expecter) GetPVC(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_GetPVC_Call

GetPVC is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string

func (*MockClientInterface_Expecter) SetCommonLabels added in v0.0.9

func (_e *MockClientInterface_Expecter) SetCommonLabels(labels interface{}) *MockClientInterface_SetCommonLabels_Call

SetCommonLabels is a helper method to define mock.On call

  • labels map[string]string

func (*MockClientInterface_Expecter) WaitForJobCompletion added in v0.0.13

func (_e *MockClientInterface_Expecter) WaitForJobCompletion(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForJobCompletion_Call

WaitForJobCompletion is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string
  • opts WaitForJobCompletionOpts

func (*MockClientInterface_Expecter) WaitForReadyEndpoint

func (_e *MockClientInterface_Expecter) WaitForReadyEndpoint(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyEndpoint_Call

WaitForReadyEndpoint is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string
  • opts WaitForReadyEndpointOpts

func (*MockClientInterface_Expecter) WaitForReadyPod

func (_e *MockClientInterface_Expecter) WaitForReadyPod(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyPod_Call

WaitForReadyPod is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string
  • opts WaitForReadyPodOpts

func (*MockClientInterface_Expecter) WaitForReadyService

func (_e *MockClientInterface_Expecter) WaitForReadyService(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyService_Call

WaitForReadyService is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • name string
  • opts WaitForReadyServiceOpts

type MockClientInterface_GetEndpoint_Call

type MockClientInterface_GetEndpoint_Call struct {
	*mock.Call
}

MockClientInterface_GetEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEndpoint'

func (*MockClientInterface_GetEndpoint_Call) Return

func (*MockClientInterface_GetEndpoint_Call) Run

func (*MockClientInterface_GetEndpoint_Call) RunAndReturn

type MockClientInterface_GetPVC_Call

type MockClientInterface_GetPVC_Call struct {
	*mock.Call
}

MockClientInterface_GetPVC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPVC'

func (*MockClientInterface_GetPVC_Call) Return

func (*MockClientInterface_GetPVC_Call) Run

func (*MockClientInterface_GetPVC_Call) RunAndReturn

type MockClientInterface_SetCommonLabels_Call added in v0.0.9

type MockClientInterface_SetCommonLabels_Call struct {
	*mock.Call
}

MockClientInterface_SetCommonLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCommonLabels'

func (*MockClientInterface_SetCommonLabels_Call) Return added in v0.0.9

func (*MockClientInterface_SetCommonLabels_Call) Run added in v0.0.9

func (*MockClientInterface_SetCommonLabels_Call) RunAndReturn added in v0.0.9

type MockClientInterface_WaitForJobCompletion_Call added in v0.0.13

type MockClientInterface_WaitForJobCompletion_Call struct {
	*mock.Call
}

MockClientInterface_WaitForJobCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForJobCompletion'

func (*MockClientInterface_WaitForJobCompletion_Call) Return added in v0.0.13

func (*MockClientInterface_WaitForJobCompletion_Call) Run added in v0.0.13

func (*MockClientInterface_WaitForJobCompletion_Call) RunAndReturn added in v0.0.13

type MockClientInterface_WaitForReadyEndpoint_Call

type MockClientInterface_WaitForReadyEndpoint_Call struct {
	*mock.Call
}

MockClientInterface_WaitForReadyEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForReadyEndpoint'

func (*MockClientInterface_WaitForReadyEndpoint_Call) Return

func (*MockClientInterface_WaitForReadyEndpoint_Call) Run

type MockClientInterface_WaitForReadyPod_Call

type MockClientInterface_WaitForReadyPod_Call struct {
	*mock.Call
}

MockClientInterface_WaitForReadyPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForReadyPod'

func (*MockClientInterface_WaitForReadyPod_Call) Return

func (*MockClientInterface_WaitForReadyPod_Call) Run

func (*MockClientInterface_WaitForReadyPod_Call) RunAndReturn

type MockClientInterface_WaitForReadyService_Call

type MockClientInterface_WaitForReadyService_Call struct {
	*mock.Call
}

MockClientInterface_WaitForReadyService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForReadyService'

func (*MockClientInterface_WaitForReadyService_Call) Return

func (*MockClientInterface_WaitForReadyService_Call) Run

type SingleContainerVolume

type SingleContainerVolume struct {
	Name         string              `yaml:"name" jsonschema:"required"`
	MountPaths   []string            `yaml:"mountPaths" jsonschema:"required"`
	VolumeSource corev1.VolumeSource `yaml:"volumeSource" jsonschema:"required"`
}

Helpers Represents a volume that is mounted in a single container.

func NewSingleContainerPVC

func NewSingleContainerPVC(pvcName, mountPath string) SingleContainerVolume

func NewSingleContainerSecret

func NewSingleContainerSecret(secretName, mountPath string, items ...corev1.KeyToPath) SingleContainerVolume

func (*SingleContainerVolume) ToVolume

func (scv *SingleContainerVolume) ToVolume() corev1.Volume

func (*SingleContainerVolume) ToVolumeMounts added in v0.0.6

func (svc *SingleContainerVolume) ToVolumeMounts() []corev1.VolumeMount

func (*SingleContainerVolume) WithMountPath added in v0.0.6

func (scv *SingleContainerVolume) WithMountPath(mountPath string) *SingleContainerVolume

type WaitForJobCompletionOpts added in v0.0.13

type WaitForJobCompletionOpts struct {
	helpers.MaxWaitTime
	// LabelSelector selects the Job by label instead of by name, for when the Job's name isn't known
	// ahead of time (e.g. CNPG's generate-named recovery Jobs). Pass a name argument or set this, not
	// both; when set, the name argument is ignored.
	LabelSelector string
}

type WaitForReadyEndpointOpts

type WaitForReadyEndpointOpts struct {
	helpers.MaxWaitTime
}

type WaitForReadyPodOpts

type WaitForReadyPodOpts struct {
	helpers.MaxWaitTime
}

type WaitForReadyServiceOpts

type WaitForReadyServiceOpts struct {
	helpers.MaxWaitTime
}

Jump to

Keyboard shortcuts

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