Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCertsFor(names ...string) (cert, key string, err error)
- func DeleteAllResourcesUniversal(kumactl KumactlOptions, descriptor core_model.ResourceTypeDescriptor, ...) error
- func DumpTempCerts(names ...string) (string, error)
- func E2EAfterAll(fn func()) bool
- func E2EAfterEach(fn func()) bool
- func E2EAfterSuite(fn func()) bool
- func E2EBeforeSuite(fn func()) bool
- func E2EDeferCleanup(args ...interface{})
- func GetPublishedDockerPorts(t testing.TestingT, container string, ports []uint32) (map[uint32]uint32, error)
- func IsDataplaneOnline(cluster Cluster, mesh, name string) (bool, bool, error)
- func Logf(format string, args ...interface{})
- func PodIPOfApp(cluster Cluster, name string, namespace string) (string, error)
- func PodNameOfApp(cluster Cluster, name string, namespace string) (string, error)
- func ShouldSkipCleanup() bool
- func WaitForMesh(mesh string, clusters []Cluster) error
- func WaitForResource(cluster Cluster, descriptor core_model.ResourceTypeDescriptor, ...) error
- type AppDeploymentOption
- func BoundToContainerIp() AppDeploymentOption
- func ProxyOnly() AppDeploymentOption
- func ServiceProbe() AppDeploymentOption
- func WithAppendDataplaneYaml(config string) 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 WithDockerContainerName(name string) AppDeploymentOption
- func WithDockerVolumes(volumes ...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 WithServiceAddress(serviceAddress 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 BlockingReader
- 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, namespace string) InstallFunc
- func DemoClientK8sCustomized(mesh string, namespace string, deploymentYaml string) InstallFunc
- func DemoClientK8sWithAffinity(mesh string, namespace string) InstallFunc
- func DemoClientUniversal(name string, mesh string, opt ...AppDeploymentOption) InstallFunc
- func EgressUniversal(tokenProvider func(zone string) (string, error)) InstallFunc
- func GatewayProxyUniversal(mesh, name string) InstallFunc
- func IngressUniversal(tokenProvider func(zone string) (string, error)) InstallFunc
- func Kuma(mode core.CpMode, opt ...KumaDeploymentOption) InstallFunc
- func MTLSMeshKubernetes(name string) InstallFunc
- func MTLSMeshUniversal(name string) InstallFunc
- func MeshKubernetes(name string) InstallFunc
- func MeshUniversal(name string) InstallFunc
- func Namespace(name string) InstallFunc
- func NamespaceWithSidecarInjection(namespace string) InstallFunc
- func NamespaceWithSidecarInjectionOnAnnotation(namespace string) InstallFunc
- func ResourceUniversal(resource model.Resource) InstallFunc
- func TestServerExternalServiceUniversal(name string, mesh string, port int, tls bool) InstallFunc
- func TestServerUniversal(name string, mesh 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) AddPortForward(portForwards PortFwd, name string) error
- func (c *K8sCluster) ApplyAndWaitServiceOnK8sCluster(namespace string, service string, yamlPath string) error
- func (c *K8sCluster) CreateNamespace(namespace string) error
- func (c *K8sCluster) CreateNode(name string, label 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) DeleteMesh(mesh string) error
- func (c *K8sCluster) DeleteNamespace(namespace string) error
- func (c *K8sCluster) DeleteNode(name string) error
- func (c *K8sCluster) DeleteNodeViaApi(node 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) GetKumaCPLogs() (string, error)
- func (c *K8sCluster) GetKumactlOptions() *KumactlOptions
- func (c *K8sCluster) GetPodLogs(pod v1.Pod) (string, error)
- func (c *K8sCluster) GetTesting() testing.TestingT
- func (c *K8sCluster) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
- func (c *K8sCluster) GetZoneEgressPortForward() PortFwd
- func (c *K8sCluster) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
- func (c *K8sCluster) GetZoneIngressPortForward() PortFwd
- func (c *K8sCluster) Install(fn InstallFunc) error
- func (c *K8sCluster) KillAppPod(app, namespace string) error
- func (c *K8sCluster) LoadImages(names ...string) error
- func (c *K8sCluster) Name() string
- func (c *K8sCluster) RestartControlPlane() error
- func (c *K8sCluster) SetCP(cp *K8sControlPlane)
- func (c *K8sCluster) StartZoneEgress() error
- func (c *K8sCluster) StartZoneIngress() error
- func (c *K8sCluster) StopControlPlane() error
- func (c *K8sCluster) StopZoneEgress() error
- func (c *K8sCluster) StopZoneIngress() error
- func (c *K8sCluster) TriggerDeleteNamespace(namespace string) 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) WaitNodeDelete(node string) (string, error)
- 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) CreateNode(name string, label 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) DeleteNode(name 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 (cs *K8sClusters) GetKumaCPLogs() (string, error)
- func (cs *K8sClusters) GetKumactlOptions() *KumactlOptions
- func (cs *K8sClusters) GetTesting() testing.TestingT
- func (cs *K8sClusters) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
- func (cs *K8sClusters) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
- func (cs *K8sClusters) LoadImages(names ...string) error
- func (cs *K8sClusters) Name() string
- func (cs *K8sClusters) UpgradeKuma(mode string, opt ...KumaDeploymentOption) error
- func (cs *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) ClosePortForwards()
- func (c *K8sControlPlane) FinalizeAdd() error
- func (c *K8sControlPlane) FinalizeAddWithPortFwd(portFwd PortFwd) 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) GetKumaCPPods() []v1.Pod
- func (c *K8sControlPlane) GetKumaCPSvcs() []v1.Service
- func (c *K8sControlPlane) GetMetrics() (string, error)
- func (c *K8sControlPlane) GetName() string
- func (c *K8sControlPlane) InstallCP(args ...string) (string, error)
- func (c *K8sControlPlane) PortForwardKumaCP()
- func (c *K8sControlPlane) PortFwd() PortFwd
- 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 K8sNetworkingState
- type K8sType
- type KumaDeploymentOption
- func WithCNI() KumaDeploymentOption
- func WithCPReplicas(cpReplicas int) KumaDeploymentOption
- func WithCtlOpts(opts map[string]string) KumaDeploymentOption
- func WithEgress() KumaDeploymentOption
- func WithEgressEnvoyAdminTunnel() KumaDeploymentOption
- func WithEnv(name, value string) KumaDeploymentOption
- func WithEnvs(entries map[string]string) KumaDeploymentOption
- func WithExperimentalCNI() 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 WithIngressEnvoyAdminTunnel() 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) KumactlInstallObservability(namespace string, components []string) (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 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) GetContainerName() 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) AddNetworking(networking UniversalNetworking, name string) error
- 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(appname string) error
- func (c *UniversalCluster) DeleteDeployment(name string) error
- func (c *UniversalCluster) DeleteKuma() error
- func (c *UniversalCluster) DeleteMesh(mesh string) error
- func (c *UniversalCluster) DeleteMeshApps(mesh string) 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) ExecWithCustomRetries(namespace, podName, appname string, retries int, timeout time.Duration, ...) (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) GetKumaCPLogs() (string, error)
- func (c *UniversalCluster) GetKumactlOptions() *KumactlOptions
- func (c *UniversalCluster) GetTesting() testing.TestingT
- func (c *UniversalCluster) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
- func (c *UniversalCluster) GetZoneEgressEnvoyTunnelE() (envoy_admin.Tunnel, error)
- func (c *UniversalCluster) GetZoneEgressNetworking() UniversalNetworking
- func (c *UniversalCluster) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
- func (c *UniversalCluster) GetZoneIngressEnvoyTunnelE() (envoy_admin.Tunnel, error)
- func (c *UniversalCluster) GetZoneIngressNetworking() UniversalNetworking
- func (c *UniversalCluster) Install(fn InstallFunc) error
- func (c *UniversalCluster) Name() string
- func (c *UniversalCluster) SetCp(cp *UniversalControlPlane)
- 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(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(string) Deployment
- func (cs *UniversalClusters) DismissCluster() error
- func (cs *UniversalClusters) Exec(string, string, string, ...string) (string, string, error)
- func (cs *UniversalClusters) ExecWithRetries(string, string, string, ...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 (cs *UniversalClusters) GetKumaCPLogs() (string, error)
- func (cs *UniversalClusters) GetKumactlOptions() *KumactlOptions
- func (cs *UniversalClusters) GetTesting() testing.TestingT
- func (cs *UniversalClusters) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
- func (cs *UniversalClusters) GetZoneEgressEnvoyTunnelE() (envoy_admin.Tunnel, error)
- func (cs *UniversalClusters) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
- func (cs *UniversalClusters) GetZoneIngressEnvoyTunnelE() (envoy_admin.Tunnel, 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) GetMetrics() (string, error)
- func (c *UniversalControlPlane) GetName() string
- func (c *UniversalControlPlane) Networking() UniversalNetworking
- func (c *UniversalControlPlane) UpdateObject(typeName string, objectName string, ...) error
- type UniversalNetworking
- type UniversalNetworkingState
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 DeleteAllResourcesUniversal ¶ added in v1.8.1
func DeleteAllResourcesUniversal(kumactl KumactlOptions, descriptor core_model.ResourceTypeDescriptor, mesh string) error
func DumpTempCerts ¶ added in v1.8.1
func E2EAfterAll ¶ added in v1.8.1
func E2EAfterAll(fn func()) bool
func E2EAfterEach ¶
func E2EAfterEach(fn func()) bool
func E2EAfterSuite ¶
func E2EAfterSuite(fn func()) bool
func E2EBeforeSuite ¶
func E2EBeforeSuite(fn func()) bool
func E2EDeferCleanup ¶ added in v1.8.1
func E2EDeferCleanup(args ...interface{})
func GetPublishedDockerPorts ¶ added in v1.8.1
func IsDataplaneOnline ¶ added in v1.8.1
func Logf ¶ added in v1.8.1
func Logf(format string, args ...interface{})
Logf logs a test progress message.
func PodIPOfApp ¶ added in v1.8.1
func PodNameOfApp ¶ added in v1.8.1
func ShouldSkipCleanup ¶
func ShouldSkipCleanup() bool
func WaitForMesh ¶ added in v1.8.1
func WaitForResource ¶ added in v1.8.1
func WaitForResource(cluster Cluster, descriptor core_model.ResourceTypeDescriptor, key core_model.ResourceKey) error
Types ¶
type AppDeploymentOption ¶ added in v1.8.1
type AppDeploymentOption interface {
ApplyApp(*appDeploymentOptions)
}
func BoundToContainerIp ¶ added in v1.8.1
func BoundToContainerIp() AppDeploymentOption
BoundToContainerIp only works with Universal
func ProxyOnly ¶
func ProxyOnly() AppDeploymentOption
func ServiceProbe ¶
func ServiceProbe() AppDeploymentOption
func WithAppendDataplaneYaml ¶ added in v1.8.1
func WithAppendDataplaneYaml(config string) 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 WithDockerContainerName ¶ added in v1.8.1
func WithDockerContainerName(name string) AppDeploymentOption
func WithDockerVolumes ¶ added in v1.8.1
func WithDockerVolumes(volumes ...string) AppDeploymentOption
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 WithServiceAddress ¶ added in v1.8.1
func WithServiceAddress(serviceAddress 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 BlockingReader ¶ added in v1.8.1
type BlockingReader struct { }
type Cluster ¶
type Cluster interface { // Cluster Name() string DismissCluster() error // Generic DeployKuma(mode core.CpMode, opts ...KumaDeploymentOption) error GetKuma() ControlPlane GetKumaCPLogs() (string, error) VerifyKuma() error DeleteKuma() error GetKumactlOptions() *KumactlOptions Deployment(name string) Deployment Deploy(deployment Deployment) error DeleteDeployment(name string) error WithTimeout(timeout time.Duration) Cluster WithRetries(retries int) Cluster GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel Verbose() bool // K8s GetKubectlOptions(namespace ...string) *k8s.KubectlOptions CreateNamespace(namespace string) error DeleteNamespace(namespace string) error DeployApp(fs ...AppDeploymentOption) 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 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"` HelmGlobalExtraYaml string `yaml:"HelmGlobalExtraYaml,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"` DefaultObservabilityNamespace string `yaml:"observabilityNamespace,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"` ZoneEgressApp string `yaml:"zoneEgressApp,omitempty" envconfig:"KUMA_ZONE_EGRESS_APP"` ZoneIngressApp string `yaml:"zoneIngressApp,omitempty" envconfig:"KUMA_ZONE_INGRESS_APP"` Arch string `yaml:"arch,omitempty" envconfig:"ARCH"` 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 HelmSuiteConfig struct {
Versions []string `yaml:"versions,omitempty"`
}
type InstallFunc ¶
func Combine ¶
func Combine(fs ...InstallFunc) InstallFunc
func DemoClientJobK8s ¶
func DemoClientJobK8s(namespace, mesh, destination string) InstallFunc
func DemoClientK8s ¶
func DemoClientK8s(mesh string, namespace string) InstallFunc
func DemoClientK8sCustomized ¶ added in v1.8.1
func DemoClientK8sCustomized(mesh string, namespace string, deploymentYaml string) InstallFunc
func DemoClientK8sWithAffinity ¶ added in v1.8.1
func DemoClientK8sWithAffinity(mesh string, namespace string) InstallFunc
func DemoClientUniversal ¶
func DemoClientUniversal(name string, mesh string, opt ...AppDeploymentOption) InstallFunc
func EgressUniversal ¶ added in v1.8.1
func EgressUniversal(tokenProvider func(zone string) (string, error)) InstallFunc
func GatewayProxyUniversal ¶ added in v1.8.1
func GatewayProxyUniversal(mesh, name string) InstallFunc
func IngressUniversal ¶
func IngressUniversal(tokenProvider func(zone string) (string, error)) InstallFunc
func Kuma ¶
func Kuma(mode core.CpMode, opt ...KumaDeploymentOption) InstallFunc
func MTLSMeshKubernetes ¶ added in v1.8.1
func MTLSMeshKubernetes(name string) InstallFunc
func MTLSMeshUniversal ¶ added in v1.8.1
func MTLSMeshUniversal(name string) InstallFunc
func MeshKubernetes ¶ added in v1.8.1
func MeshKubernetes(name string) InstallFunc
func MeshUniversal ¶ added in v1.8.1
func MeshUniversal(name string) 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. https://github.com/kumahq/kuma/issues/4005
func ResourceUniversal ¶ added in v1.8.1
func ResourceUniversal(resource model.Resource) InstallFunc
func TestServerExternalServiceUniversal ¶ added in v1.8.1
func TestServerExternalServiceUniversal(name string, mesh string, port int, tls bool) InstallFunc
func TestServerUniversal ¶
func TestServerUniversal(name string, mesh 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 testing.TestingT, clusterName string, verbose bool) *K8sCluster
func (*K8sCluster) AddPortForward ¶ added in v1.8.1
func (c *K8sCluster) AddPortForward(portForwards PortFwd, name string) error
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) CreateNode ¶ added in v1.8.1
func (c *K8sCluster) CreateNode(name string, label string) error
CreateNode creates a new node warning: there seems to be a bug in k3s1 v1.19.16 so that each tests needs a unique node name
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) DeleteMesh ¶ added in v1.8.1
func (c *K8sCluster) DeleteMesh(mesh string) error
func (*K8sCluster) DeleteNamespace ¶
func (c *K8sCluster) DeleteNamespace(namespace string) error
func (*K8sCluster) DeleteNode ¶ added in v1.8.1
func (c *K8sCluster) DeleteNode(name string) error
func (*K8sCluster) DeleteNodeViaApi ¶ added in v1.8.1
func (c *K8sCluster) DeleteNodeViaApi(node 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) GetKumaCPLogs ¶ added in v1.8.1
func (c *K8sCluster) GetKumaCPLogs() (string, error)
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) GetZoneEgressEnvoyTunnel ¶ added in v1.8.1
func (c *K8sCluster) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
func (*K8sCluster) GetZoneEgressPortForward ¶ added in v1.8.1
func (c *K8sCluster) GetZoneEgressPortForward() PortFwd
func (*K8sCluster) GetZoneIngressEnvoyTunnel ¶ added in v1.8.1
func (c *K8sCluster) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
func (*K8sCluster) GetZoneIngressPortForward ¶ added in v1.8.1
func (c *K8sCluster) GetZoneIngressPortForward() PortFwd
func (*K8sCluster) Install ¶ added in v1.8.1
func (c *K8sCluster) Install(fn InstallFunc) error
func (*K8sCluster) KillAppPod ¶ added in v1.8.1
func (c *K8sCluster) KillAppPod(app, namespace string) error
func (*K8sCluster) LoadImages ¶ added in v1.8.1
func (c *K8sCluster) LoadImages(names ...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) SetCP ¶ added in v1.8.1
func (c *K8sCluster) SetCP(cp *K8sControlPlane)
func (*K8sCluster) StartZoneEgress ¶ added in v1.8.1
func (c *K8sCluster) StartZoneEgress() error
StartZoneEngress scales the replicas of a zone engress to 1 and wait for it to complete.
func (*K8sCluster) StartZoneIngress ¶ added in v1.8.1
func (c *K8sCluster) StartZoneIngress() error
StartZoneIngress scales the replicas of a zone ingress to 1 and wait for it to complete.
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) StopZoneEgress ¶ added in v1.8.1
func (c *K8sCluster) StopZoneEgress() error
StopZoneEgress scales the replicas of a zone egress to 0 and wait for it to complete. Useful for testing behavior when traffic goes through egress but there is no instance.
func (*K8sCluster) StopZoneIngress ¶ added in v1.8.1
func (c *K8sCluster) StopZoneIngress() error
StopZoneIngress scales the replicas of a zone ingress to 0 and wait for it to complete. Useful for testing behavior when traffic goes through ingress but there is no instance.
func (*K8sCluster) TriggerDeleteNamespace ¶ added in v1.8.1
func (c *K8sCluster) TriggerDeleteNamespace(namespace string) error
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) WaitNodeDelete ¶ added in v1.8.1
func (c *K8sCluster) WaitNodeDelete(node string) (string, error)
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) CreateNode ¶ added in v1.8.1
func (cs *K8sClusters) CreateNode(name string, label 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) DeleteNode ¶ added in v1.8.1
func (cs *K8sClusters) DeleteNode(name 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) GetKumaCPLogs ¶ added in v1.8.1
func (cs *K8sClusters) GetKumaCPLogs() (string, error)
func (*K8sClusters) GetKumactlOptions ¶
func (cs *K8sClusters) GetKumactlOptions() *KumactlOptions
func (*K8sClusters) GetTesting ¶
func (cs *K8sClusters) GetTesting() testing.TestingT
func (*K8sClusters) GetZoneEgressEnvoyTunnel ¶ added in v1.8.1
func (cs *K8sClusters) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
func (*K8sClusters) GetZoneIngressEnvoyTunnel ¶ added in v1.8.1
func (cs *K8sClusters) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
func (*K8sClusters) LoadImages ¶ added in v1.8.1
func (cs *K8sClusters) LoadImages(names ...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 (cs *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 NewK8sControlPlane( t testing.TestingT, mode core.CpMode, clusterName string, kubeconfig string, cluster *K8sCluster, verbose bool, replicas int, ) *K8sControlPlane
func (*K8sControlPlane) ClosePortForwards ¶ added in v1.8.1
func (c *K8sControlPlane) ClosePortForwards()
func (*K8sControlPlane) FinalizeAdd ¶
func (c *K8sControlPlane) FinalizeAdd() error
func (*K8sControlPlane) FinalizeAddWithPortFwd ¶ added in v1.8.1
func (c *K8sControlPlane) FinalizeAddWithPortFwd(portFwd PortFwd) 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) 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) InstallCP ¶
func (c *K8sControlPlane) InstallCP(args ...string) (string, error)
func (*K8sControlPlane) PortForwardKumaCP ¶
func (c *K8sControlPlane) PortForwardKumaCP()
func (*K8sControlPlane) PortFwd ¶ added in v1.8.1
func (c *K8sControlPlane) PortFwd() PortFwd
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 K8sNetworkingState ¶ added in v1.8.1
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 WithEgressEnvoyAdminTunnel ¶ added in v1.8.1
func WithEgressEnvoyAdminTunnel() KumaDeploymentOption
func WithEnv ¶
func WithEnv(name, value string) KumaDeploymentOption
func WithEnvs ¶ added in v1.8.1
func WithEnvs(entries map[string]string) KumaDeploymentOption
func WithExperimentalCNI ¶ added in v1.8.1
func WithExperimentalCNI() 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 WithIngressEnvoyAdminTunnel ¶ added in v1.8.1
func WithIngressEnvoyAdminTunnel() 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 NewKumactlOptions(t testing.TestingT, cpname string, verbose bool) *KumactlOptions
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) KumactlInstallObservability ¶ added in v1.8.1
func (k *KumactlOptions) KumactlInstallObservability(namespace string, components []string) (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 PortFwd ¶
type PortFwd struct { ApiServerEndpoint string `json:"apiServerEndpoint"` // contains filtered or unexported fields }
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) GetContainerName ¶ added in v1.8.1
func (s *UniversalApp) GetContainerName() 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) AddNetworking ¶ added in v1.8.1
func (c *UniversalCluster) AddNetworking(networking UniversalNetworking, name string) error
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(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) DeleteMesh ¶ added in v1.8.1
func (c *UniversalCluster) DeleteMesh(mesh string) error
func (*UniversalCluster) DeleteMeshApps ¶ added in v1.8.1
func (c *UniversalCluster) DeleteMeshApps(mesh string) 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) ExecWithCustomRetries ¶ added in v1.8.1
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) GetKumaCPLogs ¶ added in v1.8.1
func (c *UniversalCluster) GetKumaCPLogs() (string, error)
func (*UniversalCluster) GetKumactlOptions ¶
func (c *UniversalCluster) GetKumactlOptions() *KumactlOptions
func (*UniversalCluster) GetTesting ¶
func (c *UniversalCluster) GetTesting() testing.TestingT
func (*UniversalCluster) GetZoneEgressEnvoyTunnel ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
func (*UniversalCluster) GetZoneEgressEnvoyTunnelE ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneEgressEnvoyTunnelE() (envoy_admin.Tunnel, error)
func (*UniversalCluster) GetZoneEgressNetworking ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneEgressNetworking() UniversalNetworking
func (*UniversalCluster) GetZoneIngressEnvoyTunnel ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
func (*UniversalCluster) GetZoneIngressEnvoyTunnelE ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneIngressEnvoyTunnelE() (envoy_admin.Tunnel, error)
func (*UniversalCluster) GetZoneIngressNetworking ¶ added in v1.8.1
func (c *UniversalCluster) GetZoneIngressNetworking() UniversalNetworking
func (*UniversalCluster) Install ¶ added in v1.8.1
func (c *UniversalCluster) Install(fn InstallFunc) error
func (*UniversalCluster) Name ¶
func (c *UniversalCluster) Name() string
func (*UniversalCluster) SetCp ¶ added in v1.8.1
func (c *UniversalCluster) SetCp(cp *UniversalControlPlane)
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(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(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) GetKumaCPLogs ¶ added in v1.8.1
func (cs *UniversalClusters) GetKumaCPLogs() (string, error)
func (*UniversalClusters) GetKumactlOptions ¶
func (cs *UniversalClusters) GetKumactlOptions() *KumactlOptions
func (*UniversalClusters) GetTesting ¶
func (cs *UniversalClusters) GetTesting() testing.TestingT
func (*UniversalClusters) GetZoneEgressEnvoyTunnel ¶ added in v1.8.1
func (cs *UniversalClusters) GetZoneEgressEnvoyTunnel() envoy_admin.Tunnel
func (*UniversalClusters) GetZoneEgressEnvoyTunnelE ¶ added in v1.8.1
func (cs *UniversalClusters) GetZoneEgressEnvoyTunnelE() (envoy_admin.Tunnel, error)
func (*UniversalClusters) GetZoneIngressEnvoyTunnel ¶ added in v1.8.1
func (cs *UniversalClusters) GetZoneIngressEnvoyTunnel() envoy_admin.Tunnel
func (*UniversalClusters) GetZoneIngressEnvoyTunnelE ¶ added in v1.8.1
func (cs *UniversalClusters) GetZoneIngressEnvoyTunnelE() (envoy_admin.Tunnel, 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, verbose bool, networking UniversalNetworking) (*UniversalControlPlane, error)
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) GetMetrics ¶ added in v1.8.1
func (c *UniversalControlPlane) GetMetrics() (string, error)
func (*UniversalControlPlane) GetName ¶
func (c *UniversalControlPlane) GetName() string
func (*UniversalControlPlane) Networking ¶ added in v1.8.1
func (c *UniversalControlPlane) Networking() UniversalNetworking
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
type UniversalNetworking ¶ added in v1.8.1
type UniversalNetworking struct { IP string `json:"ip"` // IP inside a docker network ApiServerPort string `json:"apiServerPort"` SshPort string `json:"sshPort"` }
func (UniversalNetworking) BootstrapAddress ¶ added in v1.8.1
func (u UniversalNetworking) BootstrapAddress() string
type UniversalNetworkingState ¶ added in v1.8.1
type UniversalNetworkingState struct { ZoneEgress UniversalNetworking `json:"zoneEgress"` ZoneIngress UniversalNetworking `json:"zoneIngress"` KumaCp UniversalNetworking `json:"kumaCp"` }