resource

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package resource implements e2e testing resource. Used for CSI EBS driver testing.

Index

Constants

View Source
const (

	// TaintNodeNotReady will be added when node is not ready
	// and feature-gate for TaintBasedEvictions flag is enabled,
	// and removed when node becomes ready.
	TaintNodeNotReady = "node.kubernetes.io/not-ready"

	// TaintNodeUnreachable will be added when node becomes unreachable
	// (corresponding to NodeReady status ConditionUnknown)
	// and feature-gate for TaintBasedEvictions flag is enabled,
	// and removed when node becomes reachable (NodeReady status ConditionTrue).
	TaintNodeUnreachable = "node.kubernetes.io/unreachable"
)
View Source
const (
	DefaultNamespaceDeletionTimeout = 10 * time.Minute
)

Variables

View Source
var (
	// UnreachableTaintTemplate is the taint for when a node becomes unreachable.
	UnreachableTaintTemplate = &corev1.Taint{
		Key:    TaintNodeUnreachable,
		Effect: v1.TaintEffectNoExecute,
	}
	// NotReadyTaintTemplate is the taint for when a node is not ready for
	// executing pods
	NotReadyTaintTemplate = &corev1.Taint{
		Key:    TaintNodeNotReady,
		Effect: v1.TaintEffectNoExecute,
	}
)

Functions

This section is empty.

Types

type DaemonSetManager

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

func NewDaemonSetManager

func NewDaemonSetManager(cs kubernetes.Interface) *DaemonSetManager

func (*DaemonSetManager) WaitDaemonSetReady

func (m *DaemonSetManager) WaitDaemonSetReady(ctx context.Context, ds *apps_v1.DaemonSet) (*apps_v1.DaemonSet, error)

type DeploymentManager

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

func NewDeploymentManager

func NewDeploymentManager(cs kubernetes.Interface) *DeploymentManager

func (*DeploymentManager) DeploymentLogger

func (m *DeploymentManager) DeploymentLogger(dp *appsv1.Deployment) error

DeploymentLogger logs replicas in the replicasets and pod statuses

func (*DeploymentManager) ListDeploymentReplicaSets

func (m *DeploymentManager) ListDeploymentReplicaSets(dp *appsv1.Deployment) ([]*appsv1.ReplicaSet, error)

ListDeploymentReplicaSets lists the replica sets in a deployment

func (*DeploymentManager) ListReplicaSetPods

func (m *DeploymentManager) ListReplicaSetPods(replicaSets []*appsv1.ReplicaSet) ([]*corev1.Pod, error)

ListReplicaSetPods lists the pods in the given replica sets

func (*DeploymentManager) WaitDeploymentDeleted

func (m *DeploymentManager) WaitDeploymentDeleted(ctx context.Context, dp *appsv1.Deployment) error

WaitDeploymentDeleted waits for a deployment to be deleted

func (*DeploymentManager) WaitDeploymentReady

func (m *DeploymentManager) WaitDeploymentReady(ctx context.Context, dp *appsv1.Deployment) (*appsv1.Deployment, error)

WaitDeploymentReady waits for a deployment to be ready

type JobManager

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

func NewJobManager

func NewJobManager(cs kubernetes.Interface) *JobManager

func (*JobManager) WaitJobComplete

func (m *JobManager) WaitJobComplete(ctx context.Context, job *batch_v1.Job) (*batch_v1.Job, error)

type Manager

func NewManager

func NewManager(cs kubernetes.Interface) *Manager

func (*Manager) Cleanup

func (f *Manager) Cleanup(ctx context.Context) error

type NamespaceManager

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

func NewNamespaceManager

func NewNamespaceManager(cs kubernetes.Interface) *NamespaceManager

func (*NamespaceManager) Cleanup

func (m *NamespaceManager) Cleanup(ctx context.Context) error

func (*NamespaceManager) CreateNamespace

func (m *NamespaceManager) CreateNamespace(ctx context.Context, name string) (*corev1.Namespace, error)

func (*NamespaceManager) CreateNamespaceUnique

func (m *NamespaceManager) CreateNamespaceUnique(ctx context.Context, baseName string) (*corev1.Namespace, error)

func (*NamespaceManager) DeleteNamespace

func (m *NamespaceManager) DeleteNamespace(ctx context.Context, namespace string) error

DeleteNamespace deletes the provided namespace, waits for it to be completely deleted.

type NodeManager

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

func NewNodeManager

func NewNodeManager(cs kubernetes.Interface) *NodeManager

func (*NodeManager) WaitNodeExists

func (m *NodeManager) WaitNodeExists(ctx context.Context, n *corev1.Node) (*corev1.Node, error)

func (*NodeManager) WaitNodeReady

func (m *NodeManager) WaitNodeReady(ctx context.Context, n *corev1.Node) (*corev1.Node, error)

type ServiceManager

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

func NewServiceManager

func NewServiceManager(cs kubernetes.Interface) *ServiceManager

func (*ServiceManager) WaitServiceHasEndpointIP

func (m *ServiceManager) WaitServiceHasEndpointIP(ctx context.Context, svc *corev1.Service, ip string) (*corev1.Service, error)

WaitServiceHasEndpointIP waits for the service to have a specific endpoint IP TODO deal with port

func (*ServiceManager) WaitServiceHasEndpointsNum

func (m *ServiceManager) WaitServiceHasEndpointsNum(ctx context.Context, svc *corev1.Service, epCounts int) (*corev1.Service, error)

WaitServiceHasEndpointsNum waits until the service has the expected number of endpoints

Jump to

Keyboard shortcuts

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