helper

package
v0.8.0 Latest Latest
Warning

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

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

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(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(namespace, podName, containerName, path string) ([]byte, error)

func (*Helper) WaitForCertificateRequestDeletion

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

func (*Helper) WaitForCertificateRequestsReady

func (h *Helper) WaitForCertificateRequestsReady(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(namespace, name string, timeout time.Duration) error

func (*Helper) WaitForPodReady

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

type Kubectl

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

func (*Kubectl) Describe

func (k *Kubectl) Describe(resources ...string) error

func (*Kubectl) DescribeResource

func (k *Kubectl) DescribeResource(resource, name string) error

func (*Kubectl) Run

func (k *Kubectl) Run(args ...string) error

Jump to

Keyboard shortcuts

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