Documentation ¶
Index ¶
- Constants
- func DeployExternalServiceEntry(cfg config.Factory, deployedNamespace, externalNamespace namespace.Instance, ...) config.Plan
- func Setup(apps *Echos, cfg Config) resource.SetupFn
- func SetupSingleNamespace(view *SingleNamespaceView, cfg Config) resource.SetupFn
- func SetupTwoNamespaces(view *TwoNamespaceView, cfg Config) resource.SetupFn
- type Config
- type EchoNamespace
- type Echos
- type External
- type SingleNamespaceView
- type TwoNamespaceView
- type View
Constants ¶
const ( ExternalSvc = "external" ExternalHostname = "fake.external.com" )
const ( ASvc = "a" BSvc = "b" CSvc = "c" DSvc = "d" ESvc = "e" TproxySvc = "tproxy" VMSvc = "vm" HeadlessSvc = "headless" StatefulSetSvc = "statefulset" ProxylessGRPCSvc = "proxyless-grpc" NakedSvc = "naked" SotwSvc = "sotw" WaypointSvc = "waypoint" CapturedSvc = "captured" )
Variables ¶
This section is empty.
Functions ¶
func SetupSingleNamespace ¶
func SetupSingleNamespace(view *SingleNamespaceView, cfg Config) resource.SetupFn
SetupSingleNamespace calls Setup and returns a SingleNamespaceView.
func SetupTwoNamespaces ¶
func SetupTwoNamespaces(view *TwoNamespaceView, cfg Config) resource.SetupFn
SetupTwoNamespaces calls Setup and returns a TwoNamespaceView.
Types ¶
type Config ¶
type Config struct { // Echos is the target Echos for the newly created echo apps. If nil, a new Echos // instance will be created. Echos *Echos // NamespaceCount indicates the number of echo namespaces to be generated. // Ignored if Namespaces is non-empty. Defaults to 1. NamespaceCount int // Namespaces is the user-provided list of echo namespaces. If empty, NamespaceCount // namespaces will be generated. Namespaces []namespace.Getter // NoExternalNamespace if true, no external namespace will be generated and no external echo // instance will be deployed. Ignored if ExternalNamespace is non-nil. NoExternalNamespace bool // ExternalNamespace the namespace to use for the external deployment. If nil, a namespace // will be generated unless NoExternalNamespace is specified. ExternalNamespace namespace.Getter // IncludeExtAuthz if enabled, an additional ext-authz container will be included in the deployment. // This is mainly used to test the CUSTOM authorization policy when the ext-authz server is deployed // locally with the application container in the same pod. IncludeExtAuthz bool // Custom allows for configuring custom echo deployments. If a deployment's namespace // is nil, it will be created in all namespaces. Otherwise, it must match one of the // namespaces configured above. // // Custom echo instances will be accessible from the `All` field in the namespace(s) under which they // were created. Configs echo.ConfigGetter }
Config for new echo deployment.
func (*Config) AddConfigs ¶
AddConfigs appends to the configs to be deployed
type EchoNamespace ¶
type EchoNamespace struct { // Namespace where the services are deployed. Namespace namespace.Instance // Standard echo app to be used by tests A echo.Instances // Standard echo app to be used by tests B echo.Instances // Standard echo app to be used by tests C echo.Instances // Dual-stack echo app to be used by tests if running in dual-stack mode D echo.Instances // IPv6 only echo app to be used by tests if running in dual-stack mode E echo.Instances // Standard echo app with TPROXY interception mode to be used by tests Tproxy echo.Instances // Headless echo app to be used by tests Headless echo.Instances // StatefulSet echo app to be used by tests StatefulSet echo.Instances // ProxylessGRPC echo app to be used by tests ProxylessGRPC echo.Instances // Echo app to be used by tests, with no sidecar injected Naked echo.Instances // A virtual machine echo app (only deployed to one cluster) VM echo.Instances // Sotw echo app uses the sotw XDS protocol. This should be functionally equivalent to A. Sotw echo.Instances // All echo apps in this namespace All echo.Services }
EchoNamespace contains the echo instances for a single namespace.
type Echos ¶
type Echos struct { // NS is the list of echo namespaces. NS []EchoNamespace // External (out-of-mesh) deployments External External // All echo instances. All echo.Services }
Echos is a common set of echo deployments to support integration testing.
func NewOrFail ¶
func NewOrFail(t resource.ContextFailer, cfg Config) *Echos
NewOrFail calls New and fails if an error is returned.
func (*Echos) SingleNamespaceView ¶
func (e *Echos) SingleNamespaceView() SingleNamespaceView
SingleNamespaceView converts this Echos into a SingleNamespaceView.
func (*Echos) TwoNamespaceView ¶
func (e *Echos) TwoNamespaceView() TwoNamespaceView
TwoNamespaceView converts this Echos into a TwoNamespaceView.
type External ¶
type External struct { // Namespace where external echo app will be deployed Namespace namespace.Instance // All external echo instances with no sidecar injected All echo.Instances }
func (External) Build ¶
func (e External) Build(t resource.Context, b deployment.Builder) deployment.Builder
func (*External) LoadValues ¶
type SingleNamespaceView ¶
type SingleNamespaceView struct { // Include the echos at the top-level, so there is no need for accessing sub-structures. EchoNamespace // External (out-of-mesh) deployments External External // All echo instances All echo.Services // contains filtered or unexported fields }
SingleNamespaceView is a simplified view of Echos for tests that only require a single namespace.
func (*SingleNamespaceView) Echos ¶
func (v *SingleNamespaceView) Echos() *Echos
type TwoNamespaceView ¶
type TwoNamespaceView struct { // Ns1 contains the echo deployments in the first namespace Ns1 EchoNamespace // Ns2 contains the echo deployments in the second namespace Ns2 EchoNamespace // Ns1AndNs2 contains just the echo services in Ns1 and Ns2 (excludes External). Ns1AndNs2 echo.Services // External (out-of-mesh) deployments External External // All echo instances All echo.Services // contains filtered or unexported fields }
TwoNamespaceView is a simplified view of Echos for tests that require 2 namespaces.
func (*TwoNamespaceView) Echos ¶
func (v *TwoNamespaceView) Echos() *Echos