itest

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const AgentLabelSelector = "app.kubernetes.io/name=ambassador-agent"

Variables

This section is empty.

Functions

func NewPodLogChan

func NewPodLogChan(ctx context.Context, cs kubernetes.Interface, labelSelector, ns string, follow bool) (<-chan string, error)

NewPodLogChan returns a chan with the specified pods logs entry-by-entry.

func PodExec

func PodExec(config *rest.Config, ns, podName string, cmd ...string) (stdout, stderr []byte, err error)

PodExec provides the functionality of `kubectl exec -n ns podName -- cmd...`.

func RunningPods added in v1.0.5

func RunningPods(ctx context.Context, cs kubernetes.Interface, labelSelector, ns string) ([]string, error)

RunningPods return the names of running pods with the given label selector in the form label=value. Running here means that at least one container is still running. I.e. the pod might well be terminating but still considered running.

Types

type AgentCom

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

func NewAgentCom

func NewAgentCom(name, ns string, restConfig *rest.Config) (*AgentCom, error)

func (*AgentCom) GetSnapshot

func (ac *AgentCom) GetSnapshot(ctx context.Context) (*agent.Snapshot, error)

func (*AgentCom) Install

func (ac *AgentCom) Install(ctx context.Context) (CleanupFunc, error)

func (*AgentCom) RPCAddress

func (ac *AgentCom) RPCAddress() string

func (*AgentCom) SetKATServerImage

func (ac *AgentCom) SetKATServerImage(image string)

func (*AgentCom) SetPort

func (ac *AgentCom) SetPort(p int)

type CleanupFunc

type CleanupFunc func(context.Context) error

func InstallHelmChart

func InstallHelmChart(ctx context.Context, config InstallationConfig) (CleanupFunc, error)

type InstallationConfig

type InstallationConfig struct {
	ReleaseName string
	Namespace   string
	ChartDir    string
	Values      map[string]any

	RESTConfig *rest.Config
	Log        action.DebugLog
}

type Suite added in v1.0.5

type Suite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*Suite) Cleanup added in v1.0.5

func (s *Suite) Cleanup(f func(context.Context) error)

func (*Suite) Config added in v1.0.5

func (s *Suite) Config() *rest.Config

func (*Suite) Context added in v1.0.5

func (s *Suite) Context() context.Context

func (*Suite) CreateNamespace added in v1.0.5

func (s *Suite) CreateNamespace(ctx context.Context, ns string) error

func (*Suite) DeleteNamespace added in v1.0.5

func (s *Suite) DeleteNamespace(ctx context.Context, ns string) error

func (*Suite) Init added in v1.0.5

func (s *Suite) Init()

func (*Suite) K8sIf added in v1.0.5

func (s *Suite) K8sIf() kubernetes.Interface

func (*Suite) Name added in v1.0.5

func (s *Suite) Name() string

func (*Suite) Namespace added in v1.0.5

func (s *Suite) Namespace() string

Jump to

Keyboard shortcuts

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