Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCertsFor(names []string) (cert, key string, err error)
- func E2EAfterEach(fn func())
- func E2EAfterSuite(fn func())
- func E2EBeforeSuite(fn func())
- func GetApiVersion() string
- func GetCniConfName() string
- func GetCpImageRegistry() string
- func GetDefaultRetries() int
- func GetDefaultTimeout() time.Duration
- func GetDpImageRegistry() string
- func GetDpInitImageRegistry() string
- func GetGlobalImageRegistry() string
- func GetGlobalImageTag() string
- func GetHelmChartPath() string
- func GetKumactlBin() string
- func GetUniversalImage() string
- func HasApiVersion() bool
- func HasCniConfName() bool
- func HasCpImageRegistry() bool
- func HasDpImageRegistry() bool
- func HasDpInitImageRegistry() bool
- func HasGlobalImageRegistry() bool
- func HasGlobalImageTag() bool
- func HasHelmChartPath() bool
- func IsIPv6() bool
- func IsInEKS() bool
- func IsK8sClustersStarted() bool
- func ShouldSkipCleanup() bool
- func SshCmd(port string, env []string, args []string) *exec.Cmd
- func UseLoadBalancer() bool
- func WaitUntilPodCompleteE(t testing.TestingT, options *k8s.KubectlOptions, podName string, retries int, ...) error
- type AppMode
- type Cluster
- type ClusterSetup
- type Clusters
- type ControlPlane
- type DeployOptionsFunc
- func ProxyOnly() DeployOptionsFunc
- func ServiceProbe() DeployOptionsFunc
- func WithAppname(appname string) DeployOptionsFunc
- func WithArgs(appArgs []string) DeployOptionsFunc
- func WithBuiltinDNS(builtindns bool) DeployOptionsFunc
- func WithCNI() DeployOptionsFunc
- func WithCPReplicas(cpReplicas int) DeployOptionsFunc
- func WithCtlOpt(name, value string) DeployOptionsFunc
- func WithDPVersion(version string) DeployOptionsFunc
- func WithEnv(name, value string) DeployOptionsFunc
- func WithGlobalAddress(address string) DeployOptionsFunc
- func WithHDS(enabled bool) DeployOptionsFunc
- func WithHelmChartPath(path string) DeployOptionsFunc
- func WithHelmChartVersion(version string) DeployOptionsFunc
- func WithHelmOpt(name, value string) DeployOptionsFunc
- func WithHelmReleaseName(name string) DeployOptionsFunc
- func WithIPv6(isipv6 bool) DeployOptionsFunc
- func WithIngress() DeployOptionsFunc
- func WithInstallationMode(mode InstallationMode) DeployOptionsFunc
- func WithMesh(mesh string) DeployOptionsFunc
- func WithName(name string) DeployOptionsFunc
- func WithNamespace(namespace string) DeployOptionsFunc
- func WithPostgres(envVars map[string]string) DeployOptionsFunc
- func WithProtocol(protocol string) DeployOptionsFunc
- func WithServiceName(name string) DeployOptionsFunc
- func WithServiceVersion(version string) DeployOptionsFunc
- func WithSkipDefaultMesh(skip bool) DeployOptionsFunc
- func WithToken(token string) DeployOptionsFunc
- func WithTransparentProxy(transparent bool) DeployOptionsFunc
- func WithYaml(appYaml string) DeployOptionsFunc
- func WithoutHelmOpt(name string) DeployOptionsFunc
- type Deployment
- type ExecOptions
- type InstallFunc
- func Combine(fs ...InstallFunc) InstallFunc
- func DemoClientJobK8s(mesh, destination string) InstallFunc
- func DemoClientK8s(mesh string) InstallFunc
- func DemoClientUniversal(name, mesh, token string, fs ...DeployOptionsFunc) InstallFunc
- func EchoServerK8s(mesh string) InstallFunc
- func EchoServerK8sIngress() InstallFunc
- func EchoServerK8sIngressWithMeshDNS() InstallFunc
- func EchoServerUniversal(name, mesh, echo, token string, fs ...DeployOptionsFunc) InstallFunc
- func IngressUniversal(token string) InstallFunc
- func IngressUniversalOldType(mesh, token string) InstallFunc
- func Kuma(mode string, fs ...DeployOptionsFunc) InstallFunc
- func KumaDNS() InstallFunc
- func Namespace(name string) InstallFunc
- func TestServerUniversal(name, mesh, token string, fs ...DeployOptionsFunc) InstallFunc
- func WaitNumPods(num int, app string) InstallFunc
- func WaitNumPodsNamespace(namespace string, num int, app string) InstallFunc
- func WaitPodsAvailable(namespace, app string) InstallFunc
- func WaitPodsComplete(namespace, app string) InstallFunc
- func WaitPodsNotAvailable(namespace, app string) InstallFunc
- func WaitService(namespace, service string) InstallFunc
- func YamlK8s(yaml string) InstallFunc
- func YamlPathK8s(path string) InstallFunc
- func YamlUniversal(yaml string) InstallFunc
- type InstallationMode
- type K8sCluster
- func (c *K8sCluster) Apply(namespace string, yamlPath string) error
- func (c *K8sCluster) ApplyAndWaitServiceOnK8sCluster(namespace string, service string, yamlPath string) error
- func (c *K8sCluster) CleanupPortForwards()
- func (c *K8sCluster) CreateNamespace(namespace string) error
- func (c *K8sCluster) DeleteApp(namespace, appname string) error
- func (c *K8sCluster) DeleteKuma(fs ...DeployOptionsFunc) error
- func (c *K8sCluster) DeleteNamespace(namespace string) error
- func (c *K8sCluster) Deploy(deployment Deployment) error
- func (c *K8sCluster) DeployApp(fs ...DeployOptionsFunc) error
- func (c *K8sCluster) DeployKuma(mode string, fs ...DeployOptionsFunc) error
- func (c *K8sCluster) Deployment(name string) Deployment
- func (c *K8sCluster) DismissCluster() (errs error)
- func (c *K8sCluster) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (c *K8sCluster) ExecWithOptions(options ExecOptions) (string, string, error)
- func (c *K8sCluster) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (c *K8sCluster) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
- func (c *K8sCluster) GetKuma() ControlPlane
- func (c *K8sCluster) GetKumactlOptions() *KumactlOptions
- func (c *K8sCluster) GetPodLogs(pod v1.Pod) (string, error)
- func (c *K8sCluster) GetTesting() testing.TestingT
- func (c *K8sCluster) InjectDNS(namespace ...string) error
- func (c *K8sCluster) Name() string
- func (c *K8sCluster) PortForwardPod(namespace string, podName string, localPort, remotePort uint32)
- func (c *K8sCluster) UpgradeKuma(mode string, fs ...DeployOptionsFunc) error
- func (c *K8sCluster) VerifyKuma() error
- func (c *K8sCluster) WaitApp(name, namespace string, replicas int) error
- func (c *K8sCluster) WaitNamespaceCreate(namespace string)
- func (c *K8sCluster) WaitNamespaceDelete(namespace string)
- func (c *K8sCluster) WithRetries(retries int) Cluster
- func (c *K8sCluster) WithTimeout(timeout time.Duration) Cluster
- type K8sClusters
- func (cs *K8sClusters) CreateNamespace(namespace string) error
- func (cs *K8sClusters) DeleteApp(namespace, appname string) error
- func (cs *K8sClusters) DeleteKuma(opts ...DeployOptionsFunc) error
- func (cs *K8sClusters) DeleteNamespace(namespace string) error
- func (cs *K8sClusters) Deploy(deployment Deployment) error
- func (cs *K8sClusters) DeployApp(fs ...DeployOptionsFunc) error
- func (cs *K8sClusters) DeployKuma(mode string, fs ...DeployOptionsFunc) error
- func (cs *K8sClusters) Deployment(name string) Deployment
- func (cs *K8sClusters) DismissCluster() error
- func (cs *K8sClusters) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (cs *K8sClusters) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (cs *K8sClusters) GetCluster(name string) Cluster
- func (cs *K8sClusters) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
- func (cs *K8sClusters) GetKuma() ControlPlane
- func (c *K8sClusters) GetKumactlOptions() *KumactlOptions
- func (cs *K8sClusters) GetTesting() testing.TestingT
- func (cs *K8sClusters) InjectDNS(namespace ...string) error
- func (cs *K8sClusters) Name() string
- func (cs *K8sClusters) UpgradeKuma(mode string, fs ...DeployOptionsFunc) error
- func (cs *K8sClusters) VerifyKuma() error
- func (cs *K8sClusters) WithRetries(retries int) Cluster
- func (cs *K8sClusters) WithTimeout(timeout time.Duration) Cluster
- type K8sControlPlane
- func (c *K8sControlPlane) FinalizeAdd() error
- func (c *K8sControlPlane) GenerateDpToken(mesh, service string) (string, error)
- func (c *K8sControlPlane) GenerateZoneIngressToken(zone string) (string, error)
- func (c *K8sControlPlane) GetGlobaStatusAPI() string
- func (c *K8sControlPlane) GetKDSServerAddress() string
- func (c *K8sControlPlane) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
- func (c *K8sControlPlane) GetKumaCPLogs() (string, error)
- func (c *K8sControlPlane) GetKumaCPPods() []v1.Pod
- func (c *K8sControlPlane) GetKumaCPSvcs() []v1.Service
- func (c *K8sControlPlane) GetName() string
- func (c *K8sControlPlane) InjectDNS(args ...string) error
- func (c *K8sControlPlane) InstallCP(args ...string) (string, error)
- func (c *K8sControlPlane) PortForwardKumaCP() error
- func (c *K8sControlPlane) VerifyKumaCtl() error
- func (c *K8sControlPlane) VerifyKumaGUI() error
- func (c *K8sControlPlane) VerifyKumaREST() error
- type KumactlOptions
- func (o *KumactlOptions) KumactlApply(configPath string) error
- func (o *KumactlOptions) KumactlApplyFromString(configData string) error
- func (o *KumactlOptions) KumactlConfigControlPlanesAdd(name, address string) error
- func (o *KumactlOptions) KumactlDelete(kumatype, name, mesh string) error
- func (o *KumactlOptions) KumactlInstallCP(mode string, args ...string) (string, error)
- func (o *KumactlOptions) KumactlInstallDNS(args ...string) (string, error)
- func (o *KumactlOptions) KumactlInstallMetrics() (string, error)
- func (o *KumactlOptions) KumactlInstallTracing() (string, error)
- func (o *KumactlOptions) KumactlList(kumatype, mesh string) ([]string, error)
- func (o *KumactlOptions) RunKumactl(args ...string) error
- func (o *KumactlOptions) RunKumactlAndGetOutput(args ...string) (string, error)
- func (o *KumactlOptions) RunKumactlAndGetOutputV(verbose bool, args ...string) (string, error)
- type PortFwd
- type SshApp
- type TestingT
- type UniversalApp
- func (s *UniversalApp) CreateDP(token, cpAddress, appname, ip, dpyaml string, builtindns, ingress bool)
- func (s *UniversalApp) CreateMainApp(env []string, args []string)
- func (s *UniversalApp) GetPublicPort(port string) string
- func (s *UniversalApp) OverrideDpVersion(version string) error
- func (s *UniversalApp) ReStart() error
- func (s *UniversalApp) Stop() error
- type UniversalCluster
- func (c *UniversalCluster) CreateDP(app *UniversalApp, appname, ip, dpyaml, token string, builtindns bool) error
- func (c *UniversalCluster) CreateNamespace(namespace string) error
- func (c *UniversalCluster) CreateZoneIngress(app *UniversalApp, appname, ip, dpyaml, token string, builtindns bool) error
- func (c *UniversalCluster) DeleteApp(namespace, appname string) error
- func (c *UniversalCluster) DeleteKuma(opts ...DeployOptionsFunc) error
- func (c *UniversalCluster) DeleteNamespace(namespace string) error
- func (c *UniversalCluster) Deploy(deployment Deployment) error
- func (c *UniversalCluster) DeployApp(fs ...DeployOptionsFunc) error
- func (c *UniversalCluster) DeployKuma(mode string, fs ...DeployOptionsFunc) error
- func (c *UniversalCluster) Deployment(name string) Deployment
- func (c *UniversalCluster) DismissCluster() (errs error)
- func (c *UniversalCluster) Exec(namespace, podName, appname string, cmd ...string) (string, string, error)
- func (c *UniversalCluster) ExecWithRetries(namespace, podName, appname string, cmd ...string) (string, string, error)
- func (c *UniversalCluster) GetApp(appName string) *UniversalApp
- func (c *UniversalCluster) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
- func (c *UniversalCluster) GetKuma() ControlPlane
- func (c *UniversalCluster) GetKumactlOptions() *KumactlOptions
- func (c *UniversalCluster) GetTesting() testing.TestingT
- func (c *UniversalCluster) InjectDNS(namespace ...string) error
- func (c *UniversalCluster) Name() string
- func (c *UniversalCluster) VerifyKuma() error
- func (c *UniversalCluster) WithRetries(retries int) Cluster
- func (c *UniversalCluster) WithTimeout(timeout time.Duration) Cluster
- type UniversalClusters
- func (cs *UniversalClusters) CreateNamespace(namespace string) error
- func (cs *UniversalClusters) DeleteApp(namespace, appname string) error
- func (cs *UniversalClusters) DeleteKuma(opts ...DeployOptionsFunc) error
- func (cs *UniversalClusters) DeleteNamespace(namespace string) error
- func (cs *UniversalClusters) Deploy(deployment Deployment) error
- func (cs *UniversalClusters) DeployApp(fs ...DeployOptionsFunc) error
- func (cs *UniversalClusters) DeployKuma(mode string, fs ...DeployOptionsFunc) error
- func (cs *UniversalClusters) Deployment(name string) Deployment
- func (cs *UniversalClusters) DismissCluster() error
- func (cs *UniversalClusters) Exec(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (cs *UniversalClusters) ExecWithRetries(namespace, podName, containerName string, cmd ...string) (string, string, error)
- func (cs *UniversalClusters) GetCluster(name string) Cluster
- func (cs *UniversalClusters) GetKubectlOptions(namespace ...string) *k8s.KubectlOptions
- func (cs *UniversalClusters) GetKuma() ControlPlane
- func (c *UniversalClusters) GetKumactlOptions() *KumactlOptions
- func (cs *UniversalClusters) GetTesting() testing.TestingT
- func (cs *UniversalClusters) InjectDNS(namespace ...string) error
- func (cs *UniversalClusters) Name() string
- func (cs *UniversalClusters) VerifyKuma() error
- func (cs *UniversalClusters) WithRetries(retries int) Cluster
- func (cs *UniversalClusters) WithTimeout(timeout time.Duration) Cluster
- type UniversalControlPlane
- func (c *UniversalControlPlane) GenerateDpToken(mesh, service string) (string, error)
- func (c *UniversalControlPlane) GenerateZoneIngressToken(zone string) (string, error)
- func (c *UniversalControlPlane) GetGlobaStatusAPI() string
- func (c *UniversalControlPlane) GetKDSServerAddress() string
- func (c *UniversalControlPlane) GetKumaCPLogs() (string, error)
- func (c *UniversalControlPlane) GetName() string
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 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 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 IsK8sClustersStarted ¶
func IsK8sClustersStarted() bool
func ShouldSkipCleanup ¶
func ShouldSkipCleanup() bool
func UseLoadBalancer ¶
func UseLoadBalancer() bool
Types ¶
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 ¶
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 ControlPlane ¶
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 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 ¶
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) 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 (*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) ExecWithRetries ¶
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 (*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 (*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 TestingT ¶
type TestingT struct { ginkgo.GinkgoTInterface // contains filtered or unexported fields }
func NewTestingT ¶
func NewTestingT() *TestingT
type UniversalApp ¶
type UniversalApp struct {
// contains filtered or unexported fields
}
func NewUniversalApp ¶
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) ExecWithRetries ¶
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) ExecWithRetries ¶
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.