kube

package
v0.0.0-...-dcdb1c8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HubValuesKey values key for the Docker image hub.
	HubValuesKey = "global.hub"

	// TagValuesKey values key for the Docker image tag.
	TagValuesKey = "global.tag"

	// ImagePullPolicyValuesKey values key for the Docker image pull policy.
	ImagePullPolicyValuesKey = "global.imagePullPolicy"

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

	// DefaultValuesFile for Istio Helm deployment.
	DefaultValuesFile = "test-values/values-istio-mcp.yaml"

	// LatestTag value
	LatestTag = "latest"

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

	// DefaultUndeployTimeout for Istio.
	DefaultUndeployTimeout = time.Second * 600
)

Variables

View Source
var (
	// ISTIO_TEST_KUBE_CONFIG is the Kubernetes configuration file to use for testing. If a configuration file
	// is specified on the command-line, that takes precedence.
	// nolint: golint
	ISTIO_TEST_KUBE_CONFIG env.Variable = "ISTIO_TEST_KUBE_CONFIG"

	// HUB is the Docker hub to be used for images.
	// nolint: golint
	HUB env.Variable = "HUB"

	// TAG is the Docker tag to be used for images.
	// nolint: golint
	TAG env.Variable = "TAG"
)

Functions

func NewEnvironment

func NewEnvironment() (api.Component, error)

NewEnvironment factory function for the component

Types

type Environment

type Environment struct {
	*kube.Accessor
	// 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 GetEnvironment

func GetEnvironment(r component.Repository) (*Environment, error)

GetEnvironment from the repository.

func GetEnvironmentOrFail

func GetEnvironmentOrFail(r component.Repository, t testing.TB) *Environment

GetEnvironmentOrFail from the repository.

func (*Environment) Close

func (e *Environment) Close() (err error)

Close implementation.

func (*Environment) DeployIstio

func (e *Environment) DeployIstio() bool

DeployIstio indicates whether the Istio system should be deployed.

func (*Environment) DeployYaml

func (e *Environment) DeployYaml(yamlFile string, scope lifecycle.Scope) (*deployment.Instance, error)

DeployYaml deploys the given yaml with the given scope.

func (*Environment) Descriptor

func (e *Environment) Descriptor() component.Descriptor

Descriptor for this component

func (*Environment) DumpState

func (e *Environment) DumpState(context string)

DumpState dumps the state of the environment to the file system and the log.

func (*Environment) Evaluate

func (e *Environment) Evaluate(template string) (string, error)

Evaluate the template against standard set of parameters. See template.parameters for details.

func (*Environment) EvaluateWithParams

func (e *Environment) EvaluateWithParams(tpl string, data interface{}) (string, error)

EvaluateWithParams the given template using the provided data.

func (*Environment) HelmValueMap

func (e *Environment) HelmValueMap() map[string]string

HelmValueMap returns the overrides for helm values.

func (*Environment) IsMtlsEnabled

func (e *Environment) IsMtlsEnabled() bool

Is mtls enabled. Check in Values flag and Values file.

func (*Environment) MinikubeIngress

func (e *Environment) MinikubeIngress() bool

MinikubeIngress 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.

func (*Environment) NamespaceForScope

func (e *Environment) NamespaceForScope(scope lifecycle.Scope) string

NamespaceForScope returns the namespace to be used for the given scope.

func (*Environment) Reset

func (e *Environment) Reset() error

Reset the environment before starting another test.

func (*Environment) Scope

func (e *Environment) Scope() lifecycle.Scope

Scope for this component.

func (*Environment) Start

func (e *Environment) Start(ctx context.Instance, scope lifecycle.Scope) error

Start implements the api.Environment interface

func (*Environment) SuiteNamespace

func (e *Environment) SuiteNamespace() string

SuiteNamespace namespace used for non-system components that have Suite scope.

func (*Environment) SystemNamespace

func (e *Environment) SystemNamespace() string

SystemNamespace namespace used for components deployed to the Istio system.

func (*Environment) TestNamespace

func (e *Environment) TestNamespace() string

TestNamespace namespace used for non-system components that have Test scope.

Jump to

Keyboard shortcuts

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