helper

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	RestConfig *rest.Config
	KubeClient kubernetes.Interface
	CMClient   cmclient.Interface
	// contains filtered or unexported fields
}

Helper provides methods for common operations needed during tests.

func NewHelper

func NewHelper(cfg *config.Config) *Helper

func (*Helper) CertificateKeyInPodPath

func (h *Helper) CertificateKeyInPodPath(ctx context.Context, namespace, podName, containerName, mountPath string,
	attr map[string]string) ([]byte, []byte, error)

func (*Helper) CertificateKeyMatch

func (h *Helper) CertificateKeyMatch(cr *cmapi.CertificateRequest, certData, keyData []byte) error

func (*Helper) FindCertificateRequestsReady

func (h *Helper) FindCertificateRequestsReady(crs []cmapi.CertificateRequest, pod *corev1.Pod) ([]*cmapi.CertificateRequest, error)

func (*Helper) Kubectl

func (h *Helper) Kubectl(ns string) *Kubectl

func (*Helper) ReadFilePathFromContainer added in v0.4.0

func (h *Helper) ReadFilePathFromContainer(ctx context.Context, namespace, podName, containerName, path string) ([]byte, error)

func (*Helper) WaitForCertificateRequestDeletion

func (h *Helper) WaitForCertificateRequestDeletion(ctx context.Context, namespace, name string, timeout time.Duration) error

func (*Helper) WaitForCertificateRequestsReady

func (h *Helper) WaitForCertificateRequestsReady(ctx context.Context, pod *corev1.Pod, timeout time.Duration) ([]*cmapi.CertificateRequest, error)

WaitForCertificateRequestReady waits for the CertificateRequest resources to enter a Ready state.

func (*Helper) WaitForPodDeletion

func (h *Helper) WaitForPodDeletion(ctx context.Context, namespace, name string, timeout time.Duration) error

func (*Helper) WaitForPodReady

func (h *Helper) WaitForPodReady(ctx context.Context, namespace, name string, timeout time.Duration) error

type Kubectl

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

func (*Kubectl) Describe

func (k *Kubectl) Describe(ctx context.Context, resources ...string) error

func (*Kubectl) DescribeResource

func (k *Kubectl) DescribeResource(ctx context.Context, resource, name string) error

func (*Kubectl) Run

func (k *Kubectl) Run(ctx context.Context, args ...string) error

Jump to

Keyboard shortcuts

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