framework

package
v0.0.0-...-45ed318 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Framework

type Framework struct {
	AmeshClient clientset.Interface
	// contains filtered or unexported fields
}

func NewDefaultFramework

func NewDefaultFramework() *Framework

func NewFramework

func NewFramework(opts *Options) *Framework

func (*Framework) AppNamespace

func (f *Framework) AppNamespace() string

func (*Framework) ApplyResourceFromString

func (f *Framework) ApplyResourceFromString(res string) error

ApplyResourceFromString creates a Kubernetes resource from the given manifest.

func (*Framework) ApplyVirtualService

func (f *Framework) ApplyVirtualService(vs *VirtualServiceConfig) error

func (*Framework) ControlPlaneNamespace

func (f *Framework) ControlPlaneNamespace() string

func (*Framework) CreateConfigMap

func (f *Framework) CreateConfigMap(name, key, value string) error

CreateConfigMap create a ConfigMap object which filled by the key/value specified by the caller.

func (*Framework) CreateCurl

func (f *Framework) CreateCurl(nameOpt ...string) string

func (*Framework) CreateCurlOutsideMesh

func (f *Framework) CreateCurlOutsideMesh(nameOpt ...string) string

func (*Framework) CreateHttpbinInMesh

func (f *Framework) CreateHttpbinInMesh(nameOpt ...string)

func (*Framework) CreateHttpbinOutsideMesh

func (f *Framework) CreateHttpbinOutsideMesh(nameOpt ...string)

func (*Framework) CreateHttpbinService

func (f *Framework) CreateHttpbinService()

func (*Framework) CreateNginxInMeshTo

func (f *Framework) CreateNginxInMeshTo(svc string, waitReady bool, nameOpt ...string) string

func (*Framework) CreateNginxOutsideMeshTo

func (f *Framework) CreateNginxOutsideMeshTo(svc string, waitReady bool, nameOpt ...string) string

func (*Framework) CreateNginxService

func (f *Framework) CreateNginxService()

func (*Framework) CreateUnavailableNginxInMeshTo

func (f *Framework) CreateUnavailableNginxInMeshTo(svc string, waitReady bool, nameOpt ...string) string

func (*Framework) CreateUnavailableNginxOutsideMeshTo

func (f *Framework) CreateUnavailableNginxOutsideMeshTo(svc string, waitReady bool, nameOpt ...string) string

func (*Framework) CurlInPod

func (f *Framework) CurlInPod(name string, args ...string) string

func (*Framework) DeletePod

func (f *Framework) DeletePod(namespace, name string) error

DeletePod deletes a Kubernetes pod from the given namespace and name.

func (*Framework) DeletePodByLabel

func (f *Framework) DeletePodByLabel(namespace string, labels ...string) error

DeletePod deletes a Kubernetes pod from the given namespace and labels.

func (*Framework) DeleteResource

func (f *Framework) DeleteResource(resourceType, namespace string, args ...string) error

func (*Framework) DeleteResourceFromString

func (f *Framework) DeleteResourceFromString(res, name string) error

DeleteResourceFromString deletes a Kubernetes resource from the given manifest.

func (*Framework) GetDeploymentLogs

func (f *Framework) GetDeploymentLogs(ns, name string) string

func (*Framework) GetDeploymentPodNames

func (f *Framework) GetDeploymentPodNames(namespace, name string) ([]string, error)

func (*Framework) GetHttpBinServiceFQDN

func (f *Framework) GetHttpBinServiceFQDN(nameOpt ...string) string

GetHttpBinServiceFQDN returns the FQDN description for HttpBin service.

func (*Framework) GetPodNamesByLabel

func (f *Framework) GetPodNamesByLabel(namespace string, labelSelector string) ([]string, error)

func (*Framework) GetServiceFQDN

func (f *Framework) GetServiceFQDN(name string) string

GetServiceFQDN returns the FQDN description for HttpBin service.

func (*Framework) GetSidecarRoutes

func (f *Framework) GetSidecarRoutes(podName string) map[string]*apisix.Route

func (*Framework) GetSidecarStatus

func (f *Framework) GetSidecarStatus(podName string) *provisioner.XdsProvisionerStatus

func (*Framework) GetSidecarUpstreams

func (f *Framework) GetSidecarUpstreams(podName string) map[string]*apisix.Upstream

func (*Framework) MakeNginxAvailable

func (f *Framework) MakeNginxAvailable(name string, waitReady bool)

func (*Framework) MakeNginxInsideMesh

func (f *Framework) MakeNginxInsideMesh(name string, waitReady bool)

func (*Framework) MakeNginxOutsideMesh

func (f *Framework) MakeNginxOutsideMesh(name string, waitReady bool)

func (*Framework) MakeNginxUnavailable

func (f *Framework) MakeNginxUnavailable(name string)

func (*Framework) NewHTTPClientToNginx

func (f *Framework) NewHTTPClientToNginx(name string) (*httpexpect.Expect, *k8s.Tunnel)

NewHTTPClientToNginx creates a http client which sends requests to nginx.

func (*Framework) RunKubectlCommand

func (f *Framework) RunKubectlCommand(args ...string) (string, error)

func (*Framework) ScaleNginx

func (f *Framework) ScaleNginx(name string, replicas int, waitReady bool)

func (*Framework) WaitForAmeshPluginConfigEvents

func (f *Framework) WaitForAmeshPluginConfigEvents(name string, typ string, status metav1.ConditionStatus) error

func (*Framework) WaitForCurlReady

func (f *Framework) WaitForCurlReady(nameOpt ...string)

func (*Framework) WaitForDeploymentPodsReady

func (f *Framework) WaitForDeploymentPodsReady(name string, namespace ...string) error

func (*Framework) WaitForHttpbinReady

func (f *Framework) WaitForHttpbinReady(nameOpt ...string)

func (*Framework) WaitForNamespaceDeletion

func (f *Framework) WaitForNamespaceDeletion(namespace string)

func (*Framework) WaitForNginxReady

func (f *Framework) WaitForNginxReady(name string)

func (*Framework) WaitForPodsReady

func (f *Framework) WaitForPodsReady(name string) error

func (*Framework) WaitForServiceReady

func (f *Framework) WaitForServiceReady(ns, name string) (string, error)

type ManifestArgs

type ManifestArgs struct {
	// Public arguments to render manifests.
	LocalRegistry string
}

type NginxArgs

type NginxArgs struct {
	*ManifestArgs
	Name          string
	ConfigMapName string
	InMesh        bool
	Version       string
	Replicas      int
	ProxyService  string
}

type Options

type Options struct {
	KubeConfig string

	AmeshControllerImage   string
	ControlPlaneImage      string
	SidecarInitImage       string
	SidecarImage           string
	ControlPlaneChartsPath []string
}

type RouteConfig

type RouteConfig struct {
	Match        *RouteMatchRule
	Fault        *RouteFaultRule
	Destinations map[string]*RouteDestinationConfig
	Timeout      float32
	Mirror       *RouteMirrorRule
}

type RouteDestinationConfig

type RouteDestinationConfig struct {
	Weight int
}

type RouteFaultAbortRule

type RouteFaultAbortRule struct {
	StatusCode int
	Percentage int
}

type RouteFaultDelayRule

type RouteFaultDelayRule struct {
	Duration   float32
	Percentage int
}

type RouteFaultRule

type RouteFaultRule struct {
	Abort *RouteFaultAbortRule
	Delay *RouteFaultDelayRule
}

type RouteMatchRule

type RouteMatchRule struct {
	Headers map[string]string
}

type RouteMirrorRule

type RouteMirrorRule struct {
	Host   string
	Subset string
}

type VirtualServiceConfig

type VirtualServiceConfig struct {
	Host         string
	Destinations []string
	Routes       []*RouteConfig
}

func (*VirtualServiceConfig) GenerateYAML

func (vs *VirtualServiceConfig) GenerateYAML() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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