framework

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 49 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Verbose = true
	Silent  = false

	TestNamespace = "kuma-test"

	Kuma1 = "kuma-1"
	Kuma2 = "kuma-2"
	Kuma3 = "kuma-3"
	Kuma4 = "kuma-4"
	Kuma5 = "kuma-5"
	Kuma6 = "kuma-6"

	DefaultRetries = 30
	DefaultTimeout = 3 * time.Second

	KumaUniversalImage = "kuma-universal"
)
View Source
const (
	AppModeCP              = "kuma-cp"
	AppIngress             = "ingress"
	AppModeEchoServer      = "echo-server"
	AppModeHttpsEchoServer = "https-echo-server"

	IngressDataplaneOldType = `` /* 197-byte string literal not displayed */

	ZoneIngress = `` /* 126-byte string literal not displayed */

	EchoServerDataplane = `` /* 232-byte string literal not displayed */

	EchoServerDataplaneWithServiceProbe = `` /* 264-byte string literal not displayed */

	EchoServerDataplaneTransparentProxy = `` /* 342-byte string literal not displayed */

	AppModeDemoClient   = "demo-client"
	DemoClientDataplane = `` /* 417-byte string literal not displayed */

	DemoClientDataplaneWithServiceProbe = `` /* 449-byte string literal not displayed */

	DemoClientDataplaneTransparentProxy = `` /* 276-byte string literal not displayed */

)

Variables

View Source
var (
	HelmInstallationMode    = InstallationMode("helm")
	KumactlInstallationMode = InstallationMode("kumactl")
)
View Source
var CNIApp = "kuma-cni"
View Source
var CNINamespace = "kube-system"
View Source
var HelmChartPath = "../../../deployments/charts/kuma"
View Source
var HelmRepo = "kuma/kuma"
View Source
var HelmSubChartPrefix = ""
View Source
var KumaCPImageRepo = "kuma-cp"
View Source
var KumaDPImageRepo = "kuma-dp"
View Source
var KumaGlobalZoneSyncServiceName = "kuma-global-zone-sync"
View Source
var KumaImageRegistry = "kumahq"
View Source
var KumaInitImageRepo = "kuma-init"
View Source
var KumaK8sDeployOpts []DeployOptionsFunc
View Source
var KumaNamespace = "kuma-system"
View Source
var KumaServiceName = "kuma-control-plane"
View Source
var KumaUniversalDeployOpts []DeployOptionsFunc
View Source
var KumaZoneK8sDeployOpts []DeployOptionsFunc

Functions

func CreateCertsFor

func CreateCertsFor(names []string) (cert, key string, err error)

func E2EAfterEach

func E2EAfterEach(fn func())

func E2EAfterSuite

func E2EAfterSuite(fn func())

func E2EBeforeSuite

func E2EBeforeSuite(fn func())

func GetApiVersion

func GetApiVersion() string

func GetCniConfName

func GetCniConfName() string

func GetCpImageRegistry

func GetCpImageRegistry() string

func GetDefaultRetries

func GetDefaultRetries() int

func GetDefaultTimeout

func GetDefaultTimeout() time.Duration

func GetDpImageRegistry

func GetDpImageRegistry() string

func GetDpInitImageRegistry

func GetDpInitImageRegistry() string

func GetGlobalImageRegistry

func GetGlobalImageRegistry() string

func GetGlobalImageTag

func GetGlobalImageTag() string

func GetHelmChartPath

func GetHelmChartPath() string

func GetKumactlBin

func GetKumactlBin() string

func GetUniversalImage

func GetUniversalImage() string

func HasApiVersion

func HasApiVersion() bool

func HasCniConfName

func HasCniConfName() bool

func HasCpImageRegistry

func HasCpImageRegistry() bool

func HasDpImageRegistry

func HasDpImageRegistry() bool

func HasDpInitImageRegistry

func HasDpInitImageRegistry() bool

func HasGlobalImageRegistry

func HasGlobalImageRegistry() bool

func HasGlobalImageTag

func HasGlobalImageTag() bool

func HasHelmChartPath

func HasHelmChartPath() bool

func IsIPv6

func IsIPv6() bool

func IsInEKS

func IsInEKS() bool

func IsK8sClustersStarted

func IsK8sClustersStarted() bool

func ShouldSkipCleanup

func ShouldSkipCleanup() bool

func SshCmd

func SshCmd(port string, env []string, args []string) *exec.Cmd

func UseLoadBalancer

func UseLoadBalancer() bool

func WaitUntilPodCompleteE

func WaitUntilPodCompleteE(t testing.TestingT, options *k8s.KubectlOptions, podName string, retries int, sleepBetweenRetries time.Duration) error

Types

type AppMode

type AppMode string

type Cluster

type Cluster interface {
	// Cluster
	Name() string
	DismissCluster() error
	// Generic
	DeployKuma(mode string, opts ...DeployOptionsFunc) error
	GetKuma() ControlPlane
	VerifyKuma() error
	DeleteKuma(opts ...DeployOptionsFunc) error
	InjectDNS(namespace ...string) error
	GetKumactlOptions() *KumactlOptions
	Deployment(name string) Deployment
	Deploy(deployment Deployment) error
	WithTimeout(timeout time.Duration) Cluster
	WithRetries(retries int) Cluster

	// K8s
	GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
	CreateNamespace(namespace string) error
	DeleteNamespace(namespace string) error
	DeployApp(fs ...DeployOptionsFunc) error
	DeleteApp(namespace, appname string) error
	Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)
	ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)

	// Testing
	GetTesting() testing.TestingT
}

func NewK8SCluster

func NewK8SCluster(t *TestingT, clusterName string, verbose bool) (Cluster, error)

func NewK8sClusterWithTimeout

func NewK8sClusterWithTimeout(t *TestingT, clusterName string, verbose bool, timeout time.Duration) (Cluster, error)

type ClusterSetup

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

func NewClusterSetup

func NewClusterSetup() *ClusterSetup

func (*ClusterSetup) Install

func (cs *ClusterSetup) Install(fn InstallFunc) *ClusterSetup

func (*ClusterSetup) Setup

func (cs *ClusterSetup) Setup(cluster Cluster) error

type Clusters

type Clusters interface {
	GetCluster(name string) Cluster
	Cluster
}

func NewK8sClusters

func NewK8sClusters(clusterNames []string, verbose bool) (Clusters, error)

func NewUniversalClusters

func NewUniversalClusters(clusterNames []string, verbose bool) (Clusters, error)

type ControlPlane

type ControlPlane interface {
	GetName() string
	GetKumaCPLogs() (string, error)
	GetKDSServerAddress() string
	GetGlobaStatusAPI() string
	GenerateDpToken(mesh, appname string) (string, error)
	GenerateZoneIngressToken(zone string) (string, error)
}

type DeployOptionsFunc

type DeployOptionsFunc func(*deployOptions)

func ProxyOnly

func ProxyOnly() DeployOptionsFunc

func ServiceProbe

func ServiceProbe() DeployOptionsFunc

func WithAppname

func WithAppname(appname string) DeployOptionsFunc

func WithArgs

func WithArgs(appArgs []string) DeployOptionsFunc

func WithBuiltinDNS

func WithBuiltinDNS(builtindns bool) DeployOptionsFunc

func WithCNI

func WithCNI() DeployOptionsFunc

func WithCPReplicas

func WithCPReplicas(cpReplicas int) DeployOptionsFunc

WithCPReplicas works only with HELM now

func WithCtlOpt

func WithCtlOpt(name, value string) DeployOptionsFunc

func WithDPVersion

func WithDPVersion(version string) DeployOptionsFunc

WithDPVersion only works with Universal now

func WithEnv

func WithEnv(name, value string) DeployOptionsFunc

func WithGlobalAddress

func WithGlobalAddress(address string) DeployOptionsFunc

func WithHDS

func WithHDS(enabled bool) DeployOptionsFunc

func WithHelmChartPath

func WithHelmChartPath(path string) DeployOptionsFunc

func WithHelmChartVersion

func WithHelmChartVersion(version string) DeployOptionsFunc

func WithHelmOpt

func WithHelmOpt(name, value string) DeployOptionsFunc

func WithHelmReleaseName

func WithHelmReleaseName(name string) DeployOptionsFunc

func WithIPv6

func WithIPv6(isipv6 bool) DeployOptionsFunc

func WithIngress

func WithIngress() DeployOptionsFunc

func WithInstallationMode

func WithInstallationMode(mode InstallationMode) DeployOptionsFunc

func WithMesh

func WithMesh(mesh string) DeployOptionsFunc

func WithName

func WithName(name string) DeployOptionsFunc

func WithNamespace

func WithNamespace(namespace string) DeployOptionsFunc

func WithPostgres

func WithPostgres(envVars map[string]string) DeployOptionsFunc

func WithProtocol

func WithProtocol(protocol string) DeployOptionsFunc

func WithServiceName

func WithServiceName(name string) DeployOptionsFunc

func WithServiceVersion

func WithServiceVersion(version string) DeployOptionsFunc

func WithSkipDefaultMesh

func WithSkipDefaultMesh(skip bool) DeployOptionsFunc

WithSkipDefaultMesh works only with HELM now

func WithToken

func WithToken(token string) DeployOptionsFunc

func WithTransparentProxy

func WithTransparentProxy(transparent bool) DeployOptionsFunc

func WithYaml

func WithYaml(appYaml string) DeployOptionsFunc

func WithoutHelmOpt

func WithoutHelmOpt(name string) DeployOptionsFunc

type Deployment

type Deployment interface {
	Name() string
	Deploy(cluster Cluster) error
	Delete(cluster Cluster) error
}

type ExecOptions

type ExecOptions struct {
	Command []string

	Namespace     string
	PodName       string
	ContainerName string

	Stdin         io.Reader
	CaptureStdout bool
	CaptureStderr bool
	// If false, whitespace in std{err,out} will be removed.
	PreserveWhitespace bool
}

ExecOptions passed to ExecWithOptions

type InstallFunc

type InstallFunc func(cluster Cluster) error

func Combine

func Combine(fs ...InstallFunc) InstallFunc

func DemoClientJobK8s

func DemoClientJobK8s(mesh, destination string) InstallFunc

func DemoClientK8s

func DemoClientK8s(mesh string) InstallFunc

func DemoClientUniversal

func DemoClientUniversal(name, mesh, token string, fs ...DeployOptionsFunc) InstallFunc

func EchoServerK8s

func EchoServerK8s(mesh string) InstallFunc

func EchoServerK8sIngress

func EchoServerK8sIngress() InstallFunc

func EchoServerK8sIngressWithMeshDNS

func EchoServerK8sIngressWithMeshDNS() InstallFunc

func EchoServerUniversal

func EchoServerUniversal(name, mesh, echo, token string, fs ...DeployOptionsFunc) InstallFunc

func IngressUniversal

func IngressUniversal(token string) InstallFunc

func IngressUniversalOldType

func IngressUniversalOldType(mesh, token string) InstallFunc

func Kuma

func Kuma(mode string, fs ...DeployOptionsFunc) InstallFunc

func KumaDNS

func KumaDNS() InstallFunc

func Namespace

func Namespace(name string) InstallFunc

func TestServerUniversal

func TestServerUniversal(name, mesh, token string, fs ...DeployOptionsFunc) InstallFunc

func WaitNumPods

func WaitNumPods(num int, app string) InstallFunc

func WaitNumPodsNamespace

func WaitNumPodsNamespace(namespace string, num int, app string) InstallFunc

func WaitPodsAvailable

func WaitPodsAvailable(namespace, app string) InstallFunc

func WaitPodsComplete

func WaitPodsComplete(namespace, app string) InstallFunc

func WaitPodsNotAvailable

func WaitPodsNotAvailable(namespace, app string) InstallFunc

func WaitService

func WaitService(namespace, service string) InstallFunc

func YamlK8s

func YamlK8s(yaml string) InstallFunc

func YamlPathK8s

func YamlPathK8s(path string) InstallFunc

func YamlUniversal

func YamlUniversal(yaml string) InstallFunc

type InstallationMode

type InstallationMode string

type K8sCluster

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

func (*K8sCluster) Apply

func (c *K8sCluster) Apply(namespace string, yamlPath string) error

func (*K8sCluster) ApplyAndWaitServiceOnK8sCluster

func (c *K8sCluster) ApplyAndWaitServiceOnK8sCluster(namespace string, service string, yamlPath string) error

func (*K8sCluster) CleanupPortForwards

func (c *K8sCluster) CleanupPortForwards()

func (*K8sCluster) CreateNamespace

func (c *K8sCluster) CreateNamespace(namespace string) error

func (*K8sCluster) DeleteApp

func (c *K8sCluster) DeleteApp(namespace, appname string) error

func (*K8sCluster) DeleteKuma

func (c *K8sCluster) DeleteKuma(fs ...DeployOptionsFunc) error

func (*K8sCluster) DeleteNamespace

func (c *K8sCluster) DeleteNamespace(namespace string) error

func (*K8sCluster) Deploy

func (c *K8sCluster) Deploy(deployment Deployment) error

func (*K8sCluster) DeployApp

func (c *K8sCluster) DeployApp(fs ...DeployOptionsFunc) error

func (*K8sCluster) DeployKuma

func (c *K8sCluster) DeployKuma(mode string, fs ...DeployOptionsFunc) error

func (*K8sCluster) Deployment

func (c *K8sCluster) Deployment(name string) Deployment

func (*K8sCluster) DismissCluster

func (c *K8sCluster) DismissCluster() (errs error)

func (*K8sCluster) Exec

func (c *K8sCluster) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)

Exec executes a command in the specified container and return stdout, stderr and error

func (*K8sCluster) ExecWithOptions

func (c *K8sCluster) ExecWithOptions(options ExecOptions) (string, string, error)

ExecWithOptions executes a command in the specified container, returning stdout, stderr and error. `options` allowed for additional parameters to be passed.

func (*K8sCluster) ExecWithRetries

func (c *K8sCluster) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)

func (*K8sCluster) GetKubectlOptions

func (c *K8sCluster) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions

func (*K8sCluster) GetKuma

func (c *K8sCluster) GetKuma() ControlPlane

func (*K8sCluster) GetKumactlOptions

func (c *K8sCluster) GetKumactlOptions() *KumactlOptions

func (*K8sCluster) GetPodLogs

func (c *K8sCluster) GetPodLogs(pod v1.Pod) (string, error)

func (*K8sCluster) GetTesting

func (c *K8sCluster) GetTesting() testing.TestingT

func (*K8sCluster) InjectDNS

func (c *K8sCluster) InjectDNS(namespace ...string) error

func (*K8sCluster) Name

func (c *K8sCluster) Name() string

func (*K8sCluster) PortForwardPod

func (c *K8sCluster) PortForwardPod(namespace string, podName string, localPort, remotePort uint32)

func (*K8sCluster) UpgradeKuma

func (c *K8sCluster) UpgradeKuma(mode string, fs ...DeployOptionsFunc) error

func (*K8sCluster) VerifyKuma

func (c *K8sCluster) VerifyKuma() error

func (*K8sCluster) WaitApp

func (c *K8sCluster) WaitApp(name, namespace string, replicas int) error

func (*K8sCluster) WaitNamespaceCreate

func (c *K8sCluster) WaitNamespaceCreate(namespace string)

func (*K8sCluster) WaitNamespaceDelete

func (c *K8sCluster) WaitNamespaceDelete(namespace string)

func (*K8sCluster) WithRetries

func (c *K8sCluster) WithRetries(retries int) Cluster

func (*K8sCluster) WithTimeout

func (c *K8sCluster) WithTimeout(timeout time.Duration) Cluster

type K8sClusters

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

func (*K8sClusters) CreateNamespace

func (cs *K8sClusters) CreateNamespace(namespace string) error

func (*K8sClusters) DeleteApp

func (cs *K8sClusters) DeleteApp(namespace, appname string) error

func (*K8sClusters) DeleteKuma

func (cs *K8sClusters) DeleteKuma(opts ...DeployOptionsFunc) error

func (*K8sClusters) DeleteNamespace

func (cs *K8sClusters) DeleteNamespace(namespace string) error

func (*K8sClusters) Deploy

func (cs *K8sClusters) Deploy(deployment Deployment) error

func (*K8sClusters) DeployApp

func (cs *K8sClusters) DeployApp(fs ...DeployOptionsFunc) error

func (*K8sClusters) DeployKuma

func (cs *K8sClusters) DeployKuma(mode string, fs ...DeployOptionsFunc) error

func (*K8sClusters) Deployment

func (cs *K8sClusters) Deployment(name string) Deployment

func (*K8sClusters) DismissCluster

func (cs *K8sClusters) DismissCluster() error

func (*K8sClusters) Exec

func (cs *K8sClusters) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)

func (*K8sClusters) ExecWithRetries

func (cs *K8sClusters) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)

func (*K8sClusters) GetCluster

func (cs *K8sClusters) GetCluster(name string) Cluster

func (*K8sClusters) GetKubectlOptions

func (cs *K8sClusters) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions

func (*K8sClusters) GetKuma

func (cs *K8sClusters) GetKuma() ControlPlane

func (*K8sClusters) GetKumactlOptions

func (c *K8sClusters) GetKumactlOptions() *KumactlOptions

func (*K8sClusters) GetTesting

func (cs *K8sClusters) GetTesting() testing.TestingT

func (*K8sClusters) InjectDNS

func (cs *K8sClusters) InjectDNS(namespace ...string) error

func (*K8sClusters) Name

func (cs *K8sClusters) Name() string

func (*K8sClusters) UpgradeKuma

func (cs *K8sClusters) UpgradeKuma(mode string, fs ...DeployOptionsFunc) error

func (*K8sClusters) VerifyKuma

func (cs *K8sClusters) VerifyKuma() error

func (*K8sClusters) WithRetries

func (cs *K8sClusters) WithRetries(retries int) Cluster

func (*K8sClusters) WithTimeout

func (cs *K8sClusters) WithTimeout(timeout time.Duration) Cluster

type K8sControlPlane

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

func NewK8sControlPlane

func NewK8sControlPlane(
	t testing.TestingT,
	mode core.CpMode,
	clusterName string,
	kubeconfig string,
	cluster *K8sCluster,
	loPort uint32,
	hiPort uint32,
	verbose bool,
	replicas int,
) *K8sControlPlane

func (*K8sControlPlane) FinalizeAdd

func (c *K8sControlPlane) FinalizeAdd() error

func (*K8sControlPlane) GenerateDpToken

func (c *K8sControlPlane) GenerateDpToken(mesh, service string) (string, error)

func (*K8sControlPlane) GenerateZoneIngressToken

func (c *K8sControlPlane) GenerateZoneIngressToken(zone string) (string, error)

func (*K8sControlPlane) GetGlobaStatusAPI

func (c *K8sControlPlane) GetGlobaStatusAPI() string

func (*K8sControlPlane) GetKDSServerAddress

func (c *K8sControlPlane) GetKDSServerAddress() string

A naive implementation to find the URL where Zone CP exposes its API

func (*K8sControlPlane) GetKubectlOptions

func (c *K8sControlPlane) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions

func (*K8sControlPlane) GetKumaCPLogs

func (c *K8sControlPlane) GetKumaCPLogs() (string, error)

func (*K8sControlPlane) GetKumaCPPods

func (c *K8sControlPlane) GetKumaCPPods() []v1.Pod

func (*K8sControlPlane) GetKumaCPSvcs

func (c *K8sControlPlane) GetKumaCPSvcs() []v1.Service

func (*K8sControlPlane) GetName

func (c *K8sControlPlane) GetName() string

func (*K8sControlPlane) InjectDNS

func (c *K8sControlPlane) InjectDNS(args ...string) error

func (*K8sControlPlane) InstallCP

func (c *K8sControlPlane) InstallCP(args ...string) (string, error)

func (*K8sControlPlane) PortForwardKumaCP

func (c *K8sControlPlane) PortForwardKumaCP() error

func (*K8sControlPlane) VerifyKumaCtl

func (c *K8sControlPlane) VerifyKumaCtl() error

func (*K8sControlPlane) VerifyKumaGUI

func (c *K8sControlPlane) VerifyKumaGUI() error

func (*K8sControlPlane) VerifyKumaREST

func (c *K8sControlPlane) VerifyKumaREST() error

type KumactlOptions

type KumactlOptions struct {
	CPName     string
	Kumactl    string
	ConfigPath string
	Verbose    bool
	Env        map[string]string
	// contains filtered or unexported fields
}

func NewKumactlOptions

func NewKumactlOptions(t testing.TestingT, cpname string, verbose bool) (*KumactlOptions, error)

func (*KumactlOptions) KumactlApply

func (o *KumactlOptions) KumactlApply(configPath string) error

func (*KumactlOptions) KumactlApplyFromString

func (o *KumactlOptions) KumactlApplyFromString(configData string) error

func (*KumactlOptions) KumactlConfigControlPlanesAdd

func (o *KumactlOptions) KumactlConfigControlPlanesAdd(name, address string) error

func (*KumactlOptions) KumactlDelete

func (o *KumactlOptions) KumactlDelete(kumatype, name, mesh string) error

func (*KumactlOptions) KumactlInstallCP

func (o *KumactlOptions) KumactlInstallCP(mode string, args ...string) (string, error)

func (*KumactlOptions) KumactlInstallDNS

func (o *KumactlOptions) KumactlInstallDNS(args ...string) (string, error)

func (*KumactlOptions) KumactlInstallMetrics

func (o *KumactlOptions) KumactlInstallMetrics() (string, error)

func (*KumactlOptions) KumactlInstallTracing

func (o *KumactlOptions) KumactlInstallTracing() (string, error)

func (*KumactlOptions) KumactlList

func (o *KumactlOptions) KumactlList(kumatype, mesh string) ([]string, error)

func (*KumactlOptions) RunKumactl

func (o *KumactlOptions) RunKumactl(args ...string) error

func (*KumactlOptions) RunKumactlAndGetOutput

func (o *KumactlOptions) RunKumactlAndGetOutput(args ...string) (string, error)

func (*KumactlOptions) RunKumactlAndGetOutputV

func (o *KumactlOptions) RunKumactlAndGetOutputV(verbose bool, args ...string) (string, error)

type PortFwd

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

type SshApp

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

func NewSshApp

func NewSshApp(verbose bool, port string, env []string, args []string) *SshApp

func (*SshApp) Err

func (s *SshApp) Err() string

func (*SshApp) Out

func (s *SshApp) Out() string

func (*SshApp) Run

func (s *SshApp) Run() error

func (*SshApp) SshCmd

func (s *SshApp) SshCmd(env []string, args []string) *exec.Cmd

func (*SshApp) Start

func (s *SshApp) Start() error

func (*SshApp) Stop

func (s *SshApp) Stop() error

func (*SshApp) Wait

func (s *SshApp) Wait() error

type TestingT

type TestingT struct {
	ginkgo.GinkgoTInterface
	// contains filtered or unexported fields
}

func NewTestingT

func NewTestingT() *TestingT

func (*TestingT) Helper

func (i *TestingT) Helper()

func (*TestingT) Name

func (i *TestingT) Name() string

type UniversalApp

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

func NewUniversalApp

func NewUniversalApp(t testing.TestingT, clusterName, dpName string, mode AppMode, isipv6, verbose bool, caps []string) (*UniversalApp, error)

func (*UniversalApp) CreateDP

func (s *UniversalApp) CreateDP(token, cpAddress, appname, ip, dpyaml string, builtindns, ingress bool)

func (*UniversalApp) CreateMainApp

func (s *UniversalApp) CreateMainApp(env []string, args []string)

func (*UniversalApp) GetPublicPort

func (s *UniversalApp) GetPublicPort(port string) string

func (*UniversalApp) OverrideDpVersion

func (s *UniversalApp) OverrideDpVersion(version string) error

func (*UniversalApp) ReStart

func (s *UniversalApp) ReStart() error

func (*UniversalApp) Stop

func (s *UniversalApp) Stop() error

type UniversalCluster

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

func NewUniversalCluster

func NewUniversalCluster(t *TestingT, name string, verbose bool) *UniversalCluster

func (*UniversalCluster) CreateDP

func (c *UniversalCluster) CreateDP(app *UniversalApp, appname, ip, dpyaml, token string, builtindns bool) error

func (*UniversalCluster) CreateNamespace

func (c *UniversalCluster) CreateNamespace(namespace string) error

func (*UniversalCluster) CreateZoneIngress

func (c *UniversalCluster) CreateZoneIngress(app *UniversalApp, appname, ip, dpyaml, token string, builtindns bool) error

func (*UniversalCluster) DeleteApp

func (c *UniversalCluster) DeleteApp(namespace, appname string) error

func (*UniversalCluster) DeleteKuma

func (c *UniversalCluster) DeleteKuma(opts ...DeployOptionsFunc) error

func (*UniversalCluster) DeleteNamespace

func (c *UniversalCluster) DeleteNamespace(namespace string) error

func (*UniversalCluster) Deploy

func (c *UniversalCluster) Deploy(deployment Deployment) error

func (*UniversalCluster) DeployApp

func (c *UniversalCluster) DeployApp(fs ...DeployOptionsFunc) error

func (*UniversalCluster) DeployKuma

func (c *UniversalCluster) DeployKuma(mode string, fs ...DeployOptionsFunc) error

func (*UniversalCluster) Deployment

func (c *UniversalCluster) Deployment(name string) Deployment

func (*UniversalCluster) DismissCluster

func (c *UniversalCluster) DismissCluster() (errs error)

func (*UniversalCluster) Exec

func (c *UniversalCluster) Exec(namespace, podName, appname string, cmd ...string) (string, string, error)

func (*UniversalCluster) ExecWithRetries

func (c *UniversalCluster) ExecWithRetries(namespace, podName, appname string, cmd ...string) (string, string, error)

func (*UniversalCluster) GetApp

func (c *UniversalCluster) GetApp(appName string) *UniversalApp

func (*UniversalCluster) GetKubectlOptions

func (c *UniversalCluster) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions

K8s

func (*UniversalCluster) GetKuma

func (c *UniversalCluster) GetKuma() ControlPlane

func (*UniversalCluster) GetKumactlOptions

func (c *UniversalCluster) GetKumactlOptions() *KumactlOptions

func (*UniversalCluster) GetTesting

func (c *UniversalCluster) GetTesting() testing.TestingT

func (*UniversalCluster) InjectDNS

func (c *UniversalCluster) InjectDNS(namespace ...string) error

func (*UniversalCluster) Name

func (c *UniversalCluster) Name() string

func (*UniversalCluster) VerifyKuma

func (c *UniversalCluster) VerifyKuma() error

func (*UniversalCluster) WithRetries

func (c *UniversalCluster) WithRetries(retries int) Cluster

func (*UniversalCluster) WithTimeout

func (c *UniversalCluster) WithTimeout(timeout time.Duration) Cluster

type UniversalClusters

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

func (*UniversalClusters) CreateNamespace

func (cs *UniversalClusters) CreateNamespace(namespace string) error

func (*UniversalClusters) DeleteApp

func (cs *UniversalClusters) DeleteApp(namespace, appname string) error

func (*UniversalClusters) DeleteKuma

func (cs *UniversalClusters) DeleteKuma(opts ...DeployOptionsFunc) error

func (*UniversalClusters) DeleteNamespace

func (cs *UniversalClusters) DeleteNamespace(namespace string) error

func (*UniversalClusters) Deploy

func (cs *UniversalClusters) Deploy(deployment Deployment) error

func (*UniversalClusters) DeployApp

func (cs *UniversalClusters) DeployApp(fs ...DeployOptionsFunc) error

func (*UniversalClusters) DeployKuma

func (cs *UniversalClusters) DeployKuma(mode string, fs ...DeployOptionsFunc) error

func (*UniversalClusters) Deployment

func (cs *UniversalClusters) Deployment(name string) Deployment

func (*UniversalClusters) DismissCluster

func (cs *UniversalClusters) DismissCluster() error

func (*UniversalClusters) Exec

func (cs *UniversalClusters) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)

func (*UniversalClusters) ExecWithRetries

func (cs *UniversalClusters) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)

func (*UniversalClusters) GetCluster

func (cs *UniversalClusters) GetCluster(name string) Cluster

func (*UniversalClusters) GetKubectlOptions

func (cs *UniversalClusters) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions

func (*UniversalClusters) GetKuma

func (cs *UniversalClusters) GetKuma() ControlPlane

func (*UniversalClusters) GetKumactlOptions

func (c *UniversalClusters) GetKumactlOptions() *KumactlOptions

func (*UniversalClusters) GetTesting

func (cs *UniversalClusters) GetTesting() testing.TestingT

func (*UniversalClusters) InjectDNS

func (cs *UniversalClusters) InjectDNS(namespace ...string) error

func (*UniversalClusters) Name

func (cs *UniversalClusters) Name() string

func (*UniversalClusters) VerifyKuma

func (cs *UniversalClusters) VerifyKuma() error

func (*UniversalClusters) WithRetries

func (cs *UniversalClusters) WithRetries(retries int) Cluster

func (*UniversalClusters) WithTimeout

func (cs *UniversalClusters) WithTimeout(timeout time.Duration) Cluster

type UniversalControlPlane

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

func NewUniversalControlPlane

func NewUniversalControlPlane(t testing.TestingT, mode core.CpMode, clusterName string, cluster *UniversalCluster, verbose bool) *UniversalControlPlane

func (*UniversalControlPlane) GenerateDpToken

func (c *UniversalControlPlane) GenerateDpToken(mesh, service string) (string, error)

func (*UniversalControlPlane) GenerateZoneIngressToken

func (c *UniversalControlPlane) GenerateZoneIngressToken(zone string) (string, error)

func (*UniversalControlPlane) GetGlobaStatusAPI

func (c *UniversalControlPlane) GetGlobaStatusAPI() string

func (*UniversalControlPlane) GetKDSServerAddress

func (c *UniversalControlPlane) GetKDSServerAddress() string

func (*UniversalControlPlane) GetKumaCPLogs

func (c *UniversalControlPlane) GetKumaCPLogs() (string, error)

func (*UniversalControlPlane) GetName

func (c *UniversalControlPlane) GetName() string

Directories

Path Synopsis
kic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳