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 Logf(format string, args ...interface{})
- func ShouldSkipCleanup() bool
- type AppDeploymentOption
- func ProxyOnly() AppDeploymentOption
- func ServiceProbe() AppDeploymentOption
- func WithAppname(appname string) AppDeploymentOption
- func WithArgs(appArgs []string) AppDeploymentOption
- func WithBuiltinDNS(builtindns bool) AppDeploymentOption
- func WithConcurrency(concurrency int) AppDeploymentOption
- func WithDPVersion(version string) AppDeploymentOption
- func WithKumactlFlow() AppDeploymentOption
- func WithMesh(mesh string) AppDeploymentOption
- func WithName(name string) AppDeploymentOption
- func WithNamespace(namespace string) AppDeploymentOption
- func WithProtocol(protocol string) AppDeploymentOption
- func WithReachableServices(services ...string) AppDeploymentOption
- func WithServiceInstance(instance string) AppDeploymentOption
- func WithServiceName(name string) AppDeploymentOption
- func WithServiceVersion(version string) AppDeploymentOption
- func WithToken(token string) AppDeploymentOption
- func WithTransparentProxy(transparent bool) AppDeploymentOption
- func WithYaml(appYaml string) AppDeploymentOption
- func WithoutDataplane() AppDeploymentOption
- type AppMode
- type AppOptionFunc
- type Cluster
- type ClusterSetup
- type Clusters
- type CniConf
- type CompatibilitySuiteConfig
- type ControlPlane
- type Deployment
- type E2eConfig
- type ExecOptions
- type GenericOption
- type HelmSuiteConfig
- type InstallFunc
- func Combine(fs ...InstallFunc) InstallFunc
- func DemoClientJobK8s(namespace, mesh, destination string) InstallFunc
- func DemoClientK8s(mesh string) InstallFunc
- func DemoClientUniversal(name, mesh, token string, opt ...AppDeploymentOption) InstallFunc
- func EgressUniversal(token string) InstallFunc
- func IngressUniversal(token string) InstallFunc
- func Kuma(mode core.CpMode, opt ...KumaDeploymentOption) InstallFunc
- func KumaDNS() InstallFunc
- func Namespace(name string) InstallFunc
- func NamespaceWithSidecarInjection(namespace string) InstallFunc
- func NamespaceWithSidecarInjectionOnAnnotation(namespace string) InstallFunc
- func TestServerUniversal(name, mesh, token string, opt ...AppDeploymentOption) InstallFunc
- func WaitNumPods(namespace string, num int, app string) InstallFunc
- func WaitPodsAvailable(namespace, app string) InstallFunc
- func WaitService(namespace, service string) InstallFunc
- func WaitUntilJobSucceed(namespace, app string) InstallFunc
- func YamlK8s(yaml string) InstallFunc
- func YamlK8sObject(obj runtime.Object) InstallFunc
- func YamlPathK8s(path string) InstallFunc
- func YamlUniversal(yaml string) InstallFunc
- type InstallationMode
- type K8sCluster
- func (c *K8sCluster) ApplyAndWaitServiceOnK8sCluster(namespace string, service string, yamlPath string) error
- func (c *K8sCluster) CreateNamespace(namespace string) error
- func (c *K8sCluster) DeleteApp(namespace, appname string) error
- func (c *K8sCluster) DeleteDeployment(name string) error
- func (c *K8sCluster) DeleteKuma() error
- func (c *K8sCluster) DeleteNamespace(namespace string) error
- func (c *K8sCluster) Deploy(deployment Deployment) error
- func (c *K8sCluster) DeployApp(opt ...AppDeploymentOption) error
- func (c *K8sCluster) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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) RestartControlPlane() error
- func (c *K8sCluster) StopControlPlane() error
- func (c *K8sCluster) UpgradeKuma(mode string, opt ...KumaDeploymentOption) error
- func (c *K8sCluster) Verbose() bool
- 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) DeleteDeployment(deploymentName string) error
- func (cs *K8sClusters) DeleteKuma() error
- func (cs *K8sClusters) DeleteNamespace(namespace string) error
- func (cs *K8sClusters) Deploy(deployment Deployment) error
- func (cs *K8sClusters) DeployApp(opt ...AppDeploymentOption) error
- func (cs *K8sClusters) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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, opt ...KumaDeploymentOption) error
- func (c *K8sClusters) Verbose() bool
- 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) GenerateZoneEgressToken(zone string) (string, error)
- func (c *K8sControlPlane) GenerateZoneIngressToken(zone string) (string, error)
- func (c *K8sControlPlane) GetAPIServerAddress() string
- func (c *K8sControlPlane) GetGlobalStatusAPI() 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) GetMetrics() (string, error)
- func (c *K8sControlPlane) GetName() string
- func (c *K8sControlPlane) InjectDNS(args ...string) error
- func (c *K8sControlPlane) InstallCP(args ...string) (string, error)
- func (c *K8sControlPlane) PortForwardKumaCP()
- func (c *K8sControlPlane) UpdateObject(typeName string, objectName string, ...) error
- func (c *K8sControlPlane) VerifyKumaCtl() error
- func (c *K8sControlPlane) VerifyKumaGUI() error
- func (c *K8sControlPlane) VerifyKumaREST() error
- type K8sType
- type KumaDeploymentOption
- func WithCNI() KumaDeploymentOption
- func WithCPReplicas(cpReplicas int) KumaDeploymentOption
- func WithCtlOpts(opts map[string]string) KumaDeploymentOption
- func WithEgress() KumaDeploymentOption
- func WithEnv(name, value string) KumaDeploymentOption
- func WithEnvs(entries map[string]string) KumaDeploymentOption
- func WithGlobalAddress(address string) KumaDeploymentOption
- func WithHDS(enabled bool) KumaDeploymentOption
- func WithHelmChartPath(path string) KumaDeploymentOption
- func WithHelmChartVersion(version string) KumaDeploymentOption
- func WithHelmOpt(name, value string) KumaDeploymentOption
- func WithHelmReleaseName(name string) KumaDeploymentOption
- func WithIngress() KumaDeploymentOption
- func WithInstallationMode(mode InstallationMode) KumaDeploymentOption
- func WithMeshUpdate(mesh string, u MeshUpdateFunc) KumaDeploymentOption
- func WithPostgres(envVars map[string]string) KumaDeploymentOption
- func WithSkipDefaultMesh(skip bool) KumaDeploymentOption
- func WithoutHelmOpt(name string) KumaDeploymentOption
- type KumaOptionFunc
- type KumactlOptions
- func (k *KumactlOptions) KumactlApply(configPath string) error
- func (k *KumactlOptions) KumactlApplyFromString(configData string) error
- func (k *KumactlOptions) KumactlConfigControlPlanesAdd(name, address, token string) error
- func (k *KumactlOptions) KumactlDelete(kumatype, name, mesh string) error
- func (k *KumactlOptions) KumactlInstallCP(mode string, args ...string) (string, error)
- func (k *KumactlOptions) KumactlInstallDNS(args ...string) (string, error)
- func (k *KumactlOptions) KumactlInstallMetrics() (string, error)
- func (k *KumactlOptions) KumactlInstallTracing() (string, error)
- func (k *KumactlOptions) KumactlList(kumatype, mesh string) ([]string, error)
- func (k *KumactlOptions) KumactlUpdateObject(typeName string, objectName string, ...) error
- func (k *KumactlOptions) RunKumactl(args ...string) error
- func (k *KumactlOptions) RunKumactlAndGetOutput(args ...string) (string, error)
- func (k *KumactlOptions) RunKumactlAndGetOutputV(verbose bool, args ...string) (string, error)
- type MeshUpdateFunc
- type PortFwd
- type SshApp
- type SuiteConfig
- type TestingT
- type UniversalApp
- func (s *UniversalApp) CreateDP(token, cpAddress, name, mesh, ip, dpyaml string, builtindns bool, ...)
- func (s *UniversalApp) CreateMainApp(env map[string]string, args []string)
- func (s *UniversalApp) GetIP() 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, name, mesh, ip, dpyaml, token string, builtindns bool, ...) error
- func (c *UniversalCluster) CreateNamespace(namespace string) error
- func (c *UniversalCluster) CreateZoneEgress(app *UniversalApp, name, ip, dpYAML, token string, builtinDNS bool) error
- func (c *UniversalCluster) CreateZoneIngress(app *UniversalApp, name, ip, dpyaml, token string, builtindns bool) error
- func (c *UniversalCluster) DeleteApp(namespace, appname string) error
- func (c *UniversalCluster) DeleteDeployment(name string) error
- func (c *UniversalCluster) DeleteKuma() error
- func (c *UniversalCluster) DeleteNamespace(namespace string) error
- func (c *UniversalCluster) Deploy(deployment Deployment) error
- func (c *UniversalCluster) DeployApp(opt ...AppDeploymentOption) error
- func (c *UniversalCluster) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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) Verbose() bool
- 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) DeleteDeployment(deploymentName string) error
- func (cs *UniversalClusters) DeleteKuma() error
- func (cs *UniversalClusters) DeleteNamespace(namespace string) error
- func (cs *UniversalClusters) Deploy(deployment Deployment) error
- func (cs *UniversalClusters) DeployApp(opt ...AppDeploymentOption) error
- func (cs *UniversalClusters) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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) Verbose() bool
- 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) GenerateZoneEgressToken(zone string) (string, error)
- func (c *UniversalControlPlane) GenerateZoneIngressToken(zone string) (string, error)
- func (c *UniversalControlPlane) GetAPIServerAddress() string
- func (c *UniversalControlPlane) GetGlobalStatusAPI() string
- func (c *UniversalControlPlane) GetKDSServerAddress() string
- func (c *UniversalControlPlane) GetKumaCPLogs() (string, error)
- func (c *UniversalControlPlane) GetMetrics() (string, error)
- func (c *UniversalControlPlane) GetName() string
- func (c *UniversalControlPlane) UpdateObject(typeName string, objectName string, ...) error
Constants ¶
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 )
const ( AppModeCP = "kuma-cp" AppIngress = "ingress" AppEgress = "egress" AppModeEchoServer = "echo-server" AppModeHttpsEchoServer = "https-echo-server" IngressDataplaneOldType = `` /* 197-byte string literal not displayed */ ZoneIngress = `` /* 126-byte string literal not displayed */ ZoneEgress = ` type: ZoneEgress name: egress networking: address: {{ address }} port: %d ` 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 = `` /* 304-byte string literal not displayed */ )
Variables ¶
var ( HelmInstallationMode = InstallationMode("helm") KumactlInstallationMode = InstallationMode("kumactl") )
var Serializer *k8sjson.Serializer
Functions ¶
func CreateCertsFor ¶
func E2EAfterEach ¶
func E2EAfterEach(fn func())
func E2EAfterSuite ¶
func E2EAfterSuite(fn func())
func E2EBeforeSuite ¶
func E2EBeforeSuite(fn func())
func Logf ¶ added in v1.8.1
func Logf(format string, args ...interface{})
Logf logs a test progress message.
func ShouldSkipCleanup ¶
func ShouldSkipCleanup() bool
Types ¶
type AppDeploymentOption ¶ added in v1.8.1
type AppDeploymentOption interface {
ApplyApp(*appDeploymentOptions)
}
func ProxyOnly ¶
func ProxyOnly() AppDeploymentOption
func ServiceProbe ¶
func ServiceProbe() AppDeploymentOption
func WithAppname ¶
func WithAppname(appname string) AppDeploymentOption
func WithArgs ¶
func WithArgs(appArgs []string) AppDeploymentOption
func WithBuiltinDNS ¶
func WithBuiltinDNS(builtindns bool) AppDeploymentOption
func WithConcurrency ¶ added in v1.8.1
func WithConcurrency(concurrency int) AppDeploymentOption
func WithDPVersion ¶
func WithDPVersion(version string) AppDeploymentOption
WithDPVersion only works with Universal now
func WithKumactlFlow ¶ added in v1.8.1
func WithKumactlFlow() AppDeploymentOption
WithKumactlFlow creates the Dataplane resource in the control plane before the actual data plane proxy start. If proxy is disconnected, resource won't be deleted from the storage and will be displayed as Offline.
func WithMesh ¶
func WithMesh(mesh string) AppDeploymentOption
func WithName ¶
func WithName(name string) AppDeploymentOption
func WithNamespace ¶
func WithNamespace(namespace string) AppDeploymentOption
func WithProtocol ¶
func WithProtocol(protocol string) AppDeploymentOption
func WithReachableServices ¶ added in v1.8.1
func WithReachableServices(services ...string) AppDeploymentOption
func WithServiceInstance ¶ added in v1.8.1
func WithServiceInstance(instance string) AppDeploymentOption
func WithServiceName ¶
func WithServiceName(name string) AppDeploymentOption
func WithServiceVersion ¶
func WithServiceVersion(version string) AppDeploymentOption
func WithToken ¶
func WithToken(token string) AppDeploymentOption
func WithTransparentProxy ¶
func WithTransparentProxy(transparent bool) AppDeploymentOption
func WithYaml ¶
func WithYaml(appYaml string) AppDeploymentOption
func WithoutDataplane ¶ added in v1.8.1
func WithoutDataplane() AppDeploymentOption
WithoutDataplane suppresses the automatic configuration of kuma-dp in the application container. This is useful when the test requires a container that is not bound to the mesh.
type AppOptionFunc ¶ added in v1.8.1
type AppOptionFunc func(*appDeploymentOptions)
func (AppOptionFunc) ApplyApp ¶ added in v1.8.1
func (f AppOptionFunc) ApplyApp(opts *appDeploymentOptions)
type Cluster ¶
type Cluster interface { // Cluster Name() string DismissCluster() error // Generic DeployKuma(mode core.CpMode, opts ...KumaDeploymentOption) error GetKuma() ControlPlane VerifyKuma() error DeleteKuma() error InjectDNS(namespace ...string) error GetKumactlOptions() *KumactlOptions Deployment(name string) Deployment Deploy(deployment Deployment) error DeleteDeployment(name string) error WithTimeout(timeout time.Duration) Cluster WithRetries(retries int) Cluster Verbose() bool // K8s GetKubectlOptions(namespace ...string) *k8s.KubectlOptions CreateNamespace(namespace string) error DeleteNamespace(namespace string) error DeployApp(fs ...AppDeploymentOption) 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 }
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 CompatibilitySuiteConfig ¶ added in v1.8.1
type CompatibilitySuiteConfig struct {
HelmVersion string `yaml:"helmVersion,omitempty"`
}
type ControlPlane ¶
type ControlPlane interface { GetName() string GetKumaCPLogs() (string, error) GetMetrics() (string, error) GetKDSServerAddress() string GetGlobalStatusAPI() string GetAPIServerAddress() string GenerateDpToken(mesh, serviceName string) (string, error) GenerateZoneIngressToken(zone string) (string, error) GenerateZoneEgressToken(zone string) (string, error) }
type Deployment ¶
type E2eConfig ¶ added in v1.8.1
type E2eConfig struct { KumaImageRegistry string `yaml:"imageRegistry,omitempty" envconfig:"KUMA_GLOBAL_IMAGE_REGISTRY"` KumaImageTag string `yaml:"imageTag,omitempty" envconfig:"KUMA_GLOBAL_IMAGE_TAG"` KumaNamespace string `yaml:"namespace,omitempty"` KumaServiceName string `yaml:"serviceName,omitempty"` HelmChartPath string `yaml:"helmChartPath,omitempty"` HelmSubChartPrefix string `yaml:"helmSubChartPrefix,omitempty"` HelmChartName string `yaml:"helmChartName,omitempty"` HelmRepoUrl string `yaml:"helmRepoUrl,omitempty"` CNIApp string `yaml:"CNIApp,omitempty"` CNINamespace string `yaml:"CNINamespace,omitempty"` CNIConf CniConf `yaml:"CNIConf,omitempty"` KumaGlobalZoneSyncServiceName string `yaml:"globalZoneSyncServiceName,omitempty"` KumaUniversalEnvVars map[string]string `yaml:"universalEnvVars,omitempty"` KumaZoneUniversalEnvVars map[string]string `yaml:"universalZoneEnvVars,omitempty"` KumaK8sCtlFlags map[string]string `yaml:"k8sCtlFlags,omitempty"` KumaZoneK8sCtlFlags map[string]string `yaml:"k8sZoneCtlFlags,omitempty"` DefaultTracingNamespace string `yaml:"tracingNamespace,omitempty"` DefaultGatewayNamespace string `yaml:"gatewayNamespace,omitempty"` KumaCPImageRepo string `yaml:"cpImageRepo,omitempty" envconfig:"KUMA_CP_IMAGE_REPOSITORY"` KumaDPImageRepo string `yaml:"dpImageRepo,omitempty" envconfig:"KUMA_DP_IMAGE_REPOSITORY"` KumaInitImageRepo string `yaml:"initImageRepo,omitempty" envconfig:"KUMA_INIT_IMAGE_REPOSITORY"` KumaUniversalImageRepo string `yaml:"universalImageRepo,omitempty"` XDSApiVersion string `yaml:"xdsVersion,omitempty" envconfig:"API_VERSION"` K8sType K8sType `yaml:"k8sType,omitempty" envconfig:"KUMA_K8S_TYPE"` IPV6 bool `yaml:"ipv6,omitempty" envconfig:"IPV6"` UseHostnameInsteadOfIP bool `yaml:"useHostnameInsteadOfIP,omitempty" envconfig:"KUMA_USE_HOSTNAME_INSTEAD_OF_ID"` UseLoadBalancer bool `yaml:"useLoadBalancer,omitempty" envconfig:"KUMA_USE_LOAD_BALANCER"` CIDR string `yaml:"kumaCidr,omitempty"` DefaultClusterStartupRetries int `yaml:"defaultClusterStartupRetries,omitempty" envconfig:"KUMA_DEFAULT_RETRIES"` DefaultClusterStartupTimeout time.Duration `yaml:"defaultClusterStartupTimeout,omitempty" envconfig:"KUMA_DEFAULT_TIMEOUT"` KumactlBin string `yaml:"kumactlBin,omitempty" envconfig:"KUMACTLBIN"` SuiteConfig SuiteConfig `yaml:"suites,omitempty"` }
var Config E2eConfig
func (E2eConfig) AutoConfigure ¶ added in v1.8.1
func (E2eConfig) GetUniversalImage ¶ added in v1.8.1
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 Retries int Timeout time.Duration }
ExecOptions passed to ExecWithOptions
type GenericOption ¶ added in v1.8.1
type GenericOption struct { Kuma KumaOptionFunc App AppOptionFunc }
func WithIPv6 ¶
func WithIPv6(enabled bool) *GenericOption
func WithVerbose ¶ added in v1.8.1
func WithVerbose() *GenericOption
WithVerbose enables verbose mode on the deployment.
func (*GenericOption) ApplyApp ¶ added in v1.8.1
func (o *GenericOption) ApplyApp(opts *appDeploymentOptions)
func (*GenericOption) ApplyKuma ¶ added in v1.8.1
func (o *GenericOption) ApplyKuma(opts *kumaDeploymentOptions)
type HelmSuiteConfig ¶ added in v1.8.1
type InstallFunc ¶
func Combine ¶
func Combine(fs ...InstallFunc) InstallFunc
func DemoClientJobK8s ¶
func DemoClientJobK8s(namespace, mesh, destination string) InstallFunc
func DemoClientK8s ¶
func DemoClientK8s(mesh string) InstallFunc
func DemoClientUniversal ¶
func DemoClientUniversal(name, mesh, token string, opt ...AppDeploymentOption) InstallFunc
func EgressUniversal ¶ added in v1.8.1
func EgressUniversal(token string) InstallFunc
func IngressUniversal ¶
func IngressUniversal(token string) InstallFunc
func Kuma ¶
func Kuma(mode core.CpMode, opt ...KumaDeploymentOption) InstallFunc
func KumaDNS ¶
func KumaDNS() InstallFunc
func Namespace ¶
func Namespace(name string) InstallFunc
func NamespaceWithSidecarInjection ¶ added in v1.8.1
func NamespaceWithSidecarInjection(namespace string) InstallFunc
func NamespaceWithSidecarInjectionOnAnnotation ¶ added in v1.8.1
func NamespaceWithSidecarInjectionOnAnnotation(namespace string) InstallFunc
NamespaceWithSidecarInjectionOnAnnotation creates namespace with sidecar-injection annotation Since we still support annotations for backwards compatibility, we should also test it. Use NamespaceWithSidecarInjection unless you want to explicitly check backwards compatibility.
func TestServerUniversal ¶
func TestServerUniversal(name, mesh, token string, opt ...AppDeploymentOption) InstallFunc
func WaitNumPods ¶
func WaitNumPods(namespace string, num int, app string) InstallFunc
func WaitPodsAvailable ¶
func WaitPodsAvailable(namespace, app string) InstallFunc
func WaitService ¶
func WaitService(namespace, service string) InstallFunc
func WaitUntilJobSucceed ¶ added in v1.8.1
func WaitUntilJobSucceed(namespace, app string) InstallFunc
func YamlK8s ¶
func YamlK8s(yaml string) InstallFunc
func YamlK8sObject ¶ added in v1.8.1
func YamlK8sObject(obj runtime.Object) 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 NewK8sCluster ¶ added in v1.8.1
func NewK8sCluster(t *TestingT, clusterName string, verbose bool) *K8sCluster
func (*K8sCluster) ApplyAndWaitServiceOnK8sCluster ¶
func (c *K8sCluster) ApplyAndWaitServiceOnK8sCluster(namespace string, service string, yamlPath string) error
func (*K8sCluster) CreateNamespace ¶
func (c *K8sCluster) CreateNamespace(namespace string) error
func (*K8sCluster) DeleteApp ¶
func (c *K8sCluster) DeleteApp(namespace, appname string) error
func (*K8sCluster) DeleteDeployment ¶ added in v1.8.1
func (c *K8sCluster) DeleteDeployment(name string) error
func (*K8sCluster) DeleteKuma ¶
func (c *K8sCluster) DeleteKuma() 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(opt ...AppDeploymentOption) error
func (*K8sCluster) DeployKuma ¶
func (c *K8sCluster) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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)
ExecWithRetries executes a command in the specified container and return stdout, stderr and error. It retries a default number of times if the command fails.
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) RestartControlPlane ¶ added in v1.8.1
func (c *K8sCluster) RestartControlPlane() error
RestartControlPlane scales the replicas of a control plane back to `c.controlplane.replicas` and waits for it to be running. Useful for testing restarts in combination with StopControlPlane.
func (*K8sCluster) StopControlPlane ¶ added in v1.8.1
func (c *K8sCluster) StopControlPlane() error
StopControlPlane scales the replicas of a control plane to 0 and wait for it to complete. Useful for testing restarts in combination with RestartControlPlane.
func (*K8sCluster) UpgradeKuma ¶
func (c *K8sCluster) UpgradeKuma(mode string, opt ...KumaDeploymentOption) error
func (*K8sCluster) Verbose ¶ added in v1.8.1
func (c *K8sCluster) Verbose() bool
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) DeleteDeployment ¶ added in v1.8.1
func (cs *K8sClusters) DeleteDeployment(deploymentName string) error
func (*K8sClusters) DeleteKuma ¶
func (cs *K8sClusters) DeleteKuma() 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(opt ...AppDeploymentOption) error
func (*K8sClusters) DeployKuma ¶
func (cs *K8sClusters) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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, opt ...KumaDeploymentOption) error
func (*K8sClusters) Verbose ¶ added in v1.8.1
func (c *K8sClusters) Verbose() bool
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) GenerateZoneEgressToken ¶ added in v1.8.1
func (c *K8sControlPlane) GenerateZoneEgressToken(zone string) (string, error)
func (*K8sControlPlane) GenerateZoneIngressToken ¶
func (c *K8sControlPlane) GenerateZoneIngressToken(zone string) (string, error)
func (*K8sControlPlane) GetAPIServerAddress ¶ added in v1.8.1
func (c *K8sControlPlane) GetAPIServerAddress() string
func (*K8sControlPlane) GetGlobalStatusAPI ¶ added in v1.8.1
func (c *K8sControlPlane) GetGlobalStatusAPI() 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) GetMetrics ¶ added in v1.8.1
func (c *K8sControlPlane) GetMetrics() (string, error)
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()
func (*K8sControlPlane) UpdateObject ¶ added in v1.8.1
func (c *K8sControlPlane) UpdateObject( typeName string, objectName string, update func(object runtime.Object) runtime.Object, ) error
UpdateObject fetches an object and updates it after the update function is applied to it.
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 KumaDeploymentOption ¶ added in v1.8.1
type KumaDeploymentOption interface {
ApplyKuma(options *kumaDeploymentOptions)
}
func WithCNI ¶
func WithCNI() KumaDeploymentOption
func WithCPReplicas ¶
func WithCPReplicas(cpReplicas int) KumaDeploymentOption
WithCPReplicas works only with HELM for now.
func WithCtlOpts ¶ added in v1.8.1
func WithCtlOpts(opts map[string]string) KumaDeploymentOption
WithCtlOpt allows arbitrary options to be passed to kuma, which is important for using test/framework in other libraries where additional options may have been added.
func WithEgress ¶ added in v1.8.1
func WithEgress() KumaDeploymentOption
func WithEnv ¶
func WithEnv(name, value string) KumaDeploymentOption
func WithEnvs ¶ added in v1.8.1
func WithEnvs(entries map[string]string) KumaDeploymentOption
func WithGlobalAddress ¶
func WithGlobalAddress(address string) KumaDeploymentOption
func WithHDS ¶
func WithHDS(enabled bool) KumaDeploymentOption
func WithHelmChartPath ¶
func WithHelmChartPath(path string) KumaDeploymentOption
func WithHelmChartVersion ¶
func WithHelmChartVersion(version string) KumaDeploymentOption
func WithHelmOpt ¶
func WithHelmOpt(name, value string) KumaDeploymentOption
func WithHelmReleaseName ¶
func WithHelmReleaseName(name string) KumaDeploymentOption
func WithIngress ¶
func WithIngress() KumaDeploymentOption
func WithInstallationMode ¶
func WithInstallationMode(mode InstallationMode) KumaDeploymentOption
func WithMeshUpdate ¶ added in v1.8.1
func WithMeshUpdate(mesh string, u MeshUpdateFunc) KumaDeploymentOption
WithMeshUpdate registers a function to update the specification for the named mesh. When the control plane implementation creates the mesh, it invokes the function and applies configuration changes to the mesh object.
func WithPostgres ¶
func WithPostgres(envVars map[string]string) KumaDeploymentOption
func WithSkipDefaultMesh ¶
func WithSkipDefaultMesh(skip bool) KumaDeploymentOption
WithSkipDefaultMesh works only with HELM now.
func WithoutHelmOpt ¶
func WithoutHelmOpt(name string) KumaDeploymentOption
type KumaOptionFunc ¶ added in v1.8.1
type KumaOptionFunc func(options *kumaDeploymentOptions)
func (KumaOptionFunc) ApplyKuma ¶ added in v1.8.1
func (f KumaOptionFunc) ApplyKuma(opts *kumaDeploymentOptions)
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 (k *KumactlOptions) KumactlApply(configPath string) error
func (*KumactlOptions) KumactlApplyFromString ¶
func (k *KumactlOptions) KumactlApplyFromString(configData string) error
func (*KumactlOptions) KumactlConfigControlPlanesAdd ¶
func (k *KumactlOptions) KumactlConfigControlPlanesAdd(name, address, token string) error
func (*KumactlOptions) KumactlDelete ¶
func (k *KumactlOptions) KumactlDelete(kumatype, name, mesh string) error
func (*KumactlOptions) KumactlInstallCP ¶
func (k *KumactlOptions) KumactlInstallCP(mode string, args ...string) (string, error)
func (*KumactlOptions) KumactlInstallDNS ¶
func (k *KumactlOptions) KumactlInstallDNS(args ...string) (string, error)
func (*KumactlOptions) KumactlInstallMetrics ¶
func (k *KumactlOptions) KumactlInstallMetrics() (string, error)
func (*KumactlOptions) KumactlInstallTracing ¶
func (k *KumactlOptions) KumactlInstallTracing() (string, error)
func (*KumactlOptions) KumactlList ¶
func (k *KumactlOptions) KumactlList(kumatype, mesh string) ([]string, error)
func (*KumactlOptions) KumactlUpdateObject ¶ added in v1.8.1
func (k *KumactlOptions) KumactlUpdateObject( typeName string, objectName string, update func(core_model.Resource) core_model.Resource, ) error
KumactlUpdateObject fetches an object and updates it after the update function is applied to it.
func (*KumactlOptions) RunKumactl ¶
func (k *KumactlOptions) RunKumactl(args ...string) error
func (*KumactlOptions) RunKumactlAndGetOutput ¶
func (k *KumactlOptions) RunKumactlAndGetOutput(args ...string) (string, error)
func (*KumactlOptions) RunKumactlAndGetOutputV ¶
func (k *KumactlOptions) RunKumactlAndGetOutputV(verbose bool, args ...string) (string, error)
type MeshUpdateFunc ¶ added in v1.8.1
type MeshUpdateFunc func(mesh *mesh_proto.Mesh) *mesh_proto.Mesh
type SuiteConfig ¶ added in v1.8.1
type SuiteConfig struct { Compatibility CompatibilitySuiteConfig `yaml:"compatibility,omitempty"` Helm HelmSuiteConfig `yaml:"helm,omitempty"` }
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, name, mesh, ip, dpyaml string, builtindns bool, proxyType string, concurrency int, )
func (*UniversalApp) CreateMainApp ¶
func (s *UniversalApp) CreateMainApp(env map[string]string, args []string)
func (*UniversalApp) GetIP ¶ added in v1.8.1
func (s *UniversalApp) GetIP() 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, name, mesh, ip, dpyaml, token string, builtindns bool, concurrency int) error
func (*UniversalCluster) CreateNamespace ¶
func (c *UniversalCluster) CreateNamespace(namespace string) error
func (*UniversalCluster) CreateZoneEgress ¶ added in v1.8.1
func (c *UniversalCluster) CreateZoneEgress( app *UniversalApp, name, ip, dpYAML, token string, builtinDNS bool, ) error
func (*UniversalCluster) CreateZoneIngress ¶
func (c *UniversalCluster) CreateZoneIngress(app *UniversalApp, name, ip, dpyaml, token string, builtindns bool) error
func (*UniversalCluster) DeleteApp ¶
func (c *UniversalCluster) DeleteApp(namespace, appname string) error
func (*UniversalCluster) DeleteDeployment ¶ added in v1.8.1
func (c *UniversalCluster) DeleteDeployment(name string) error
func (*UniversalCluster) DeleteKuma ¶
func (c *UniversalCluster) DeleteKuma() 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(opt ...AppDeploymentOption) error
func (*UniversalCluster) DeployKuma ¶
func (c *UniversalCluster) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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) Verbose ¶ added in v1.8.1
func (c *UniversalCluster) Verbose() bool
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) DeleteDeployment ¶ added in v1.8.1
func (cs *UniversalClusters) DeleteDeployment(deploymentName string) error
func (*UniversalClusters) DeleteKuma ¶
func (cs *UniversalClusters) DeleteKuma() 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(opt ...AppDeploymentOption) error
func (*UniversalClusters) DeployKuma ¶
func (cs *UniversalClusters) DeployKuma(mode core.CpMode, opt ...KumaDeploymentOption) 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) Verbose ¶ added in v1.8.1
func (cs *UniversalClusters) Verbose() bool
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) GenerateZoneEgressToken ¶ added in v1.8.1
func (c *UniversalControlPlane) GenerateZoneEgressToken(zone string) (string, error)
func (*UniversalControlPlane) GenerateZoneIngressToken ¶
func (c *UniversalControlPlane) GenerateZoneIngressToken(zone string) (string, error)
func (*UniversalControlPlane) GetAPIServerAddress ¶ added in v1.8.1
func (c *UniversalControlPlane) GetAPIServerAddress() string
func (*UniversalControlPlane) GetGlobalStatusAPI ¶ added in v1.8.1
func (c *UniversalControlPlane) GetGlobalStatusAPI() string
func (*UniversalControlPlane) GetKDSServerAddress ¶
func (c *UniversalControlPlane) GetKDSServerAddress() string
func (*UniversalControlPlane) GetKumaCPLogs ¶
func (c *UniversalControlPlane) GetKumaCPLogs() (string, error)
func (*UniversalControlPlane) GetMetrics ¶ added in v1.8.1
func (c *UniversalControlPlane) GetMetrics() (string, error)
func (*UniversalControlPlane) GetName ¶
func (c *UniversalControlPlane) GetName() string
func (*UniversalControlPlane) UpdateObject ¶ added in v1.8.1
func (c *UniversalControlPlane) UpdateObject( typeName string, objectName string, update func(object core_model.Resource) core_model.Resource, ) error