Documentation ¶
Index ¶
- Variables
- func InitLogging() error
- type App
- type AppManager
- type Cleanable
- type CommonConfig
- type GCPRawVM
- type Istioctl
- func (i *Istioctl) CreateRule(rule string) error
- func (i *Istioctl) DeleteRule(rule string) error
- func (i *Istioctl) Install() error
- func (i *Istioctl) KubeInject(src, dest string) error
- func (i *Istioctl) ReplaceRule(rule string) error
- func (i *Istioctl) Setup() error
- func (i *Istioctl) Teardown() error
- type KubeInfo
- func (k *KubeInfo) GetAppPods() map[string][]string
- func (k *KubeInfo) GetRoutes(app string) (string, error)
- func (k *KubeInfo) ImagePullPolicy() string
- func (k *KubeInfo) Ingress() (string, error)
- func (k *KubeInfo) IngressGateway() (string, error)
- func (k *KubeInfo) IngressGatewayOrFail(t *testing.T) string
- func (k *KubeInfo) IngressOrFail(t *testing.T) string
- func (k *KubeInfo) IstioEgressGatewayService() string
- func (k *KubeInfo) IstioIngressGatewayService() string
- func (k *KubeInfo) IstioIngressService() string
- func (k *KubeInfo) IstioSystemNamespace() string
- func (k *KubeInfo) PilotHub() string
- func (k *KubeInfo) PilotTag() string
- func (k *KubeInfo) ProxyHub() string
- func (k *KubeInfo) ProxyTag() string
- func (k *KubeInfo) Setup() error
- func (k *KubeInfo) Teardown() error
- type RawVM
- type TestFlags
Constants ¶
This section is empty.
Variables ¶
var ( // TestVM is true if in this test run user wants to test VM on istio TestVM = flag.Bool("test_vm", false, "whether to test VM on istio") )
Functions ¶
func InitLogging ¶
func InitLogging() error
InitLogging sets the logging directory. Should be called right after flag.Parse().
Types ¶
type App ¶
type App struct { AppYamlTemplate string AppYaml string KubeInject bool Template interface{} // contains filtered or unexported fields }
App gathers information for Hop app
type AppManager ¶
AppManager organize and deploy apps
func NewAppManager ¶
func NewAppManager(tmpDir, namespace string, istioctl *Istioctl, kubeconfig string) *AppManager
NewAppManager create a new AppManager
func (*AppManager) AddApp ¶
func (am *AppManager) AddApp(a *App)
AddApp for automated deployment. Must be done before Setup call.
func (*AppManager) CheckDeployments ¶
func (am *AppManager) CheckDeployments() error
CheckDeployments waits for a period for the deployments to be started.
func (*AppManager) DeployApp ¶
func (am *AppManager) DeployApp(a *App) error
DeployApp adds the app and deploys it to the system. Must be called after Setup call.
func (*AppManager) Teardown ¶
func (am *AppManager) Teardown() error
Teardown currently does nothing, only to satisfied cleanable{}
func (*AppManager) UndeployApp ¶
func (am *AppManager) UndeployApp(a *App) error
UndeployApp deletes the app from the system. Must be called after Setup call.
type CommonConfig ¶
type CommonConfig struct { // Test Cleanup registration Cleanup *testCleanup // Test Information Info *testInfo // Kubernetes and istio installation information Kube *KubeInfo }
CommonConfig regroup all common test configuration.
func NewCommonConfig ¶
func NewCommonConfig(testID string) (*CommonConfig, error)
NewCommonConfig creates a full config with the local head version.
func NewCommonConfigWithVersion ¶
func NewCommonConfigWithVersion(testID, version string) (*CommonConfig, error)
NewCommonConfigWithVersion creates a new CommonConfig with the specified version of Istio. If baseVersion is empty, it will use the local head version.
func (*CommonConfig) RunTest ¶
func (c *CommonConfig) RunTest(m runnable) int
RunTest sets up all registered cleanables in FIFO order Execute the runnable Call teardown on all the cleanables in LIFO order.
type GCPRawVM ¶
type GCPRawVM struct { Name string ClusterName string Namespace string ProjectID string Zone string // Use Mason does not require provisioning, and therefore all following fields are not required UseMason bool // ServiceAccount must have iam.serviceAccountActor or owner permissions // to the project. Use IAM settings. ServiceAccount string Image string ImageProject string }
GCPRawVM is hosted on Google Cloud Platform
func NewGCPRawVM ¶
NewGCPRawVM creates a new vm on GCP
func (*GCPRawVM) GetExternalIP ¶
GetExternalIP returns the internal IP of the VM
func (*GCPRawVM) GetInternalIP ¶
GetInternalIP returns the internal IP of the VM
func (*GCPRawVM) SecureCopy ¶
SecureCopy copies files to vm via scp
func (*GCPRawVM) SecureShell ¶
SecureShell execeutes cmd on vm through ssh
type Istioctl ¶
type Istioctl struct {
// contains filtered or unexported fields
}
Istioctl gathers istioctl information.
func NewIstioctl ¶
NewIstioctl create a new istioctl by given temp dir.
func (*Istioctl) CreateRule ¶
CreateRule create new rule(s)
func (*Istioctl) DeleteRule ¶
DeleteRule Delete rule(s)
func (*Istioctl) KubeInject ¶
KubeInject use istio kube-inject to create new yaml with a proxy as sidecar.
func (*Istioctl) ReplaceRule ¶
ReplaceRule replace rule(s)
type KubeInfo ¶
type KubeInfo struct { Namespace string TmpDir string AuthEnabled bool RBACEnabled bool InstallAddons bool // Extra services to be excluded from MTLS MTLSExcludedServices []string // Istioctl installation Istioctl *Istioctl // App Manager AppManager *AppManager // Release directory ReleaseDir string // Use baseversion if not empty. BaseVersion string KubeConfig string KubeClient kubernetes.Interface RemoteKubeConfig string RemoteKubeClient kubernetes.Interface RemoteAppManager *AppManager // contains filtered or unexported fields }
KubeInfo gathers information for kubectl
func (*KubeInfo) GetAppPods ¶
GetAppPods gets a map of app name to pods for that app. If pods are found, the results are cached.
func (*KubeInfo) ImagePullPolicy ¶
ImagePullPolicy exposes the pull policy override used for Docker images. May be "".
func (*KubeInfo) IngressGateway ¶
IngressGateway lazily initialize Ingress Gateway
func (*KubeInfo) IngressGatewayOrFail ¶
IngressGatewayOrFail lazily initialize ingress gateway and fail test if not found.
func (*KubeInfo) IngressOrFail ¶
IngressOrFail lazily initialize ingress and fail test if not found.
func (*KubeInfo) IstioEgressGatewayService ¶
IstioEgressGatewayService returns the service name for the egress gateway service
func (*KubeInfo) IstioIngressGatewayService ¶
IstioIngressGatewayService returns the service name for the ingress gateway service
func (*KubeInfo) IstioIngressService ¶
IstioIngressService returns the service name for the ingress service
func (*KubeInfo) IstioSystemNamespace ¶
IstioSystemNamespace returns the namespace used for the Istio system components.
type RawVM ¶
type RawVM interface { Cleanable GetInternalIP() (string, error) GetExternalIP() (string, error) SecureShell(cmd string) (string, error) SecureCopy(files ...string) (string, error) }
RawVM interfaces different cloud venders to support e2e testing with VM
type TestFlags ¶
TestFlags holds routing versions to test, and also if Ingress/Egress should be tested
func (*TestFlags) ConfigVersions ¶
ConfigVersions returns a list of strings of the enabled config versions