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

package kube

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

Index

Package Files

cluster.go flags.go kube.go settings.go

func New Uses

func New(ctx resource.Context, s *Settings) (resource.Environment, error)

New returns a new Kubernetes environment

func Setup Uses

func Setup(sfn SetupSettingsFunc) resource.SetupFn

Setup is a setup function that allows overriding values in the Kube environment settings.

type ClientFactoryFunc Uses

type ClientFactoryFunc func(kubeConfigs []string) ([]istioKube.ExtendedClient, error)

ClientFactoryFunc is a transformation function that creates k8s clients from the provided k8s config files.

type Cluster Uses

type Cluster struct {
    kube.ExtendedClient
    // contains filtered or unexported fields
}

Cluster for a Kubernetes cluster. Provides access via a kube.Client.

func (Cluster) Config Uses

func (c Cluster) Config() resource.Cluster

func (Cluster) Filename Uses

func (c Cluster) Filename() string

TODO(nmittler): Remove the need for this by changing operator to use provided kube clients directly. Filename of the kubeconfig file for this cluster.

func (Cluster) Index Uses

func (c Cluster) Index() resource.ClusterIndex

Index of this cluster within the Environment.

func (Cluster) IsConfig Uses

func (c Cluster) IsConfig() bool

func (Cluster) IsPrimary Uses

func (c Cluster) IsPrimary() bool

func (Cluster) IsRemote Uses

func (c Cluster) IsRemote() bool

func (Cluster) Name Uses

func (c Cluster) Name() string

Name provides the name this cluster used by Istio.

func (Cluster) NetworkName Uses

func (c Cluster) NetworkName() string

NetworkName the cluster is on

func (Cluster) Primary Uses

func (c Cluster) Primary() resource.Cluster

func (Cluster) String Uses

func (c Cluster) String() string

type Environment Uses

type Environment struct {
    // contains filtered or unexported fields
}

Environment is the implementation of a kubernetes environment. It implements environment.Environment, and also hosts publicly accessible methods that are specific to cluster environment.

func (*Environment) Clusters Uses

func (e *Environment) Clusters() resource.Clusters

func (*Environment) ClustersByNetwork Uses

func (e *Environment) ClustersByNetwork() map[string][]*Cluster

ClustersByNetwork returns an inverse mapping of the network topolgoy to a slice of clusters in a given network.

func (*Environment) EnvironmentName Uses

func (e *Environment) EnvironmentName() string

func (*Environment) ID Uses

func (e *Environment) ID() resource.ID

ID implements resource.Instance

func (*Environment) IsMulticluster Uses

func (e *Environment) IsMulticluster() bool

func (*Environment) IsMultinetwork Uses

func (e *Environment) IsMultinetwork() bool

IsMultinetwork returns true if there is more than one network name in networkTopology.

func (*Environment) Settings Uses

func (e *Environment) Settings() *Settings

type Settings Uses

type Settings struct {
    // An array of paths to kube config files. Required if the environment is kubernetes.
    KubeConfig []string

    // ClientFactoryFunc is an optional override for the default behavior for creating k8s clients.
    // instances for interacting with clusters. If not specified, the clients will be created from KubeConfig.
    ClientFactoryFunc ClientFactoryFunc

    // Indicates that the Ingress Gateway is not available. This typically happens in Minikube. The Ingress
    // component will fall back to node-port in this case.
    Minikube bool

    // Indicates that the LoadBalancer services can obtain a public IP. If not, NodePort be used as a workaround
    // for ingress gateway. KinD will not support LoadBalancer out of the box and requires a workaround such as
    // MetalLB.
    LoadBalancerSupported bool

    // ControlPlaneTopology maps each cluster to the cluster that runs its control plane. For replicated control
    // plane cases (where each cluster has its own control plane), the cluster will map to itself (e.g. 0->0).
    ControlPlaneTopology clusterTopology

    // ConfigTopology maps each cluster to the cluster that runs it's config.
    // If the cluster runs its own config, the cluster will map to itself (e.g. 0->0)
    // By default, we use the ControlPlaneTopology as the config topology.
    ConfigTopology clusterTopology
    // contains filtered or unexported fields
}

Settings provide kube-specific Settings from flags.

func NewSettingsFromCommandLine Uses

func NewSettingsFromCommandLine() (*Settings, error)

NewSettingsFromCommandLine returns Settings obtained from command-line flags. flag.Parse must be called before calling this function.

func (*Settings) GetControlPlaneClusters Uses

func (s *Settings) GetControlPlaneClusters() map[resource.ClusterIndex]bool

GetControlPlaneClusters returns a set containing just the cluster indexes that contain control planes.

func (*Settings) NewClients Uses

func (s *Settings) NewClients() ([]istioKube.ExtendedClient, error)

NewClients creates the kubernetes clients for interacting with the configured clusters.

func (*Settings) String Uses

func (s *Settings) String() string

String implements fmt.Stringer

type SetupSettingsFunc Uses

type SetupSettingsFunc func(s *Settings, ctx resource.Context)

Package kube imports 16 packages (graph) and is imported by 8 packages. Updated 2020-12-19. Refresh now. Tools for package owners.