istio: istio.io/istio/pkg/test/framework/components/istio Index | Files | Directories

package istio

import "istio.io/istio/pkg/test/framework/components/istio"

Index

Package Files

config.go eastwest.go flags.go helm.go ingress.go istio.go operator.go util.go

Constants

const (
    // DefaultSystemNamespace default value for SystemNamespace
    DefaultSystemNamespace = "istio-system"

    // IntegrationTestDefaultsIOP is the path of the default IstioOperator spec to use
    // for integration tests
    IntegrationTestDefaultsIOP = "tests/integration/iop-integration-test-defaults.yaml"

    // IntegrationTestRemoteDefaultsIOP is the path of the default IstioOperator spec to use
    // on remote clusters for integration tests
    IntegrationTestRemoteDefaultsIOP = "tests/integration/iop-remote-integration-test-defaults.yaml"

    // DefaultDeployTimeout for Istio
    DefaultDeployTimeout = time.Second * 300

    // DefaultCIDeployTimeout for Istio
    DefaultCIDeployTimeout = time.Minute * 10

    // DefaultUndeployTimeout for Istio.
    DefaultUndeployTimeout = time.Second * 300

    // DefaultCIUndeployTimeout for Istio.
    DefaultCIUndeployTimeout = time.Second * 900
)
const (
    ReleasePrefix     = "istio-"
    BaseChart         = "base"
    DiscoveryChart    = "istio-discovery"
    BaseReleaseName   = ReleasePrefix + BaseChart
    IstiodReleaseName = "istiod"
    ControlChartsDir  = "istio-control"
)

func ClaimSystemNamespace Uses

func ClaimSystemNamespace(ctx resource.Context) (namespace.Instance, error)

ClaimSystemNamespace retrieves the namespace for the Istio system components from the environment.

func ClaimSystemNamespaceOrFail Uses

func ClaimSystemNamespaceOrFail(t test.Failer, ctx resource.Context) namespace.Instance

ClaimSystemNamespaceOrFail calls ClaimSystemNamespace, failing the test if an error occurs.

func Indent Uses

func Indent(text, indent string) string

Indent indents a block of text with an indent string

func Setup Uses

func Setup(i *Instance, cfn SetupConfigFn, ctxFns ...SetupContextFn) resource.SetupFn

Setup is a setup function that will deploy Istio on Kubernetes environment

type Config Uses

type Config struct {
    // The namespace where the Istio components (<=1.1) reside in a typical deployment (default: "istio-system").
    SystemNamespace string

    // The namespace in which istio ca and cert provisioning components are deployed.
    IstioNamespace string

    // The namespace in which config, discovery and auto-injector are deployed.
    ConfigNamespace string

    // The namespace in which kiali, tracing providers, graphana, prometheus are deployed.
    TelemetryNamespace string

    // The namespace in which istio policy checker is deployed.
    PolicyNamespace string

    // The namespace in which istio ingressgateway is deployed
    IngressNamespace string

    // The namespace in which istio egressgateway is deployed
    EgressNamespace string

    // DeployTimeout the timeout for deploying Istio.
    DeployTimeout time.Duration

    // UndeployTimeout the timeout for undeploying Istio.
    UndeployTimeout time.Duration

    // The IstioOperator spec file to be used for Control plane cluster by default
    PrimaryClusterIOPFile string

    // The IstioOperator spec file to be used for Config cluster by default
    ConfigClusterIOPFile string

    // The IstioOperator spec file to be used for Remote cluster by default
    RemoteClusterIOPFile string

    // Override values specifically for the ICP crd
    // This is mostly required for cases where --set cannot be used
    // These values are applied to non-remote clusters
    ControlPlaneValues string

    // Override values specifically for the ICP crd
    // This is mostly required for cases where --set cannot be used
    // These values are only applied to remote clusters
    // Default value will be ControlPlaneValues if no remote values provided
    RemoteClusterValues string

    // Override values specifically for the ICP crd
    // This is mostly required for cases where --set cannot be used
    // These values are only applied to config clusters
    // Default value will be ControlPlaneValues if no remote values provided
    ConfigClusterValues string

    // Overrides for the Helm values file.
    Values map[string]string

    // Indicates that the test should deploy Istio into the target Kubernetes cluster before running tests.
    DeployIstio bool

    // Do not wait for the validation webhook before completing the deployment. This is useful for
    // doing deployments without Galley.
    SkipWaitForValidationWebhook bool

    // Indicates that the test should deploy Istio's east west gateway into the target Kubernetes cluster
    // before running tests.
    DeployEastWestGW bool

    // Indicates that the test should deploy Istio's using helm charts
    DeployHelm bool
}

Config provide kube-specific Config from flags.

func DefaultConfig Uses

func DefaultConfig(ctx resource.Context) (Config, error)

DefaultConfig creates a new Config from defaults, environments variables, and command-line parameters.

func DefaultConfigOrFail Uses

func DefaultConfigOrFail(t test.Failer, ctx resource.Context) Config

DefaultConfigOrFail calls DefaultConfig and fails t if an error occurs.

func (*Config) IstioOperatorConfigYAML Uses

func (c *Config) IstioOperatorConfigYAML(iopYaml string) string

func (*Config) OverridesYAML Uses

func (c *Config) OverridesYAML() string

func (*Config) String Uses

func (c *Config) String() string

String implements fmt.Stringer

type Instance Uses

type Instance interface {
    resource.Resource

    // IngressFor returns an ingress used for reaching workloads in the given cluster.
    // The ingress's service name will be "istio-ingressgateway" and the istio label will be "ingressgateway".
    IngressFor(cluster resource.Cluster) ingress.Instance
    // CustomIngressFor returns an ingress with a specific service name and "istio" label used for reaching workloads
    // in the given cluster.
    CustomIngressFor(cluster resource.Cluster, serviceName, istioLabel string) ingress.Instance

    // RemoteDiscoveryAddressFor returns the external address of the discovery server that controls
    // the given cluster. This allows access to the discovery server from
    // outside its cluster.
    RemoteDiscoveryAddressFor(cluster resource.Cluster) (net.TCPAddr, error)

    Settings() Config
}

Instance represents a deployed Istio instance

func Deploy Uses

func Deploy(ctx resource.Context, cfg *Config) (i Instance, err error)

Deploy deploys (or attaches to) an Istio deployment and returns a handle. If cfg is nil, then DefaultConfig is used.

func Get Uses

func Get(ctx resource.Context) (Instance, error)

Get returns the Istio component from the context. If there is none an error is returned.

func GetOrFail Uses

func GetOrFail(f test.Failer, ctx resource.Context) Instance

GetOrFail returns the Istio component from the context. If there is none the test is failed.

type SetupConfigFn Uses

type SetupConfigFn func(ctx resource.Context, cfg *Config)

SetupConfigFn is a setup function that specifies the overrides of the configuration to deploy Istio.

type SetupContextFn Uses

type SetupContextFn func(ctx resource.Context) error

SetupContextFn is a setup function that uses Context for configuration.

Directories

PathSynopsis
ingress

Package istio imports 45 packages (graph) and is imported by 10 packages. Updated 2021-01-23. Refresh now. Tools for package owners.