framework

package
v1.8.15-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const FederatedDefaultTestTimeout = 5 * time.Minute

Variables

This section is empty.

Functions

func CheckFederationVersion

func CheckFederationVersion(c federation_clientset.Interface, want string) error

func ClusterIsReadyOrFail added in v1.7.0

func ClusterIsReadyOrFail(f *Framework, clusterName string)

ClusterIsReadyOrFail checks whether the named cluster is ready

func FederationControlPlaneUpgrade

func FederationControlPlaneUpgrade(version string) error

func GetValidDNSSubdomainName

func GetValidDNSSubdomainName(name string) (string, error)

GetValidDNSSubdomainName massages the given name to be a valid dns subdomain name. Most resources (such as secrets, clusters) require the names to be valid dns subdomain. This is a generic function (not specific to federation). Should be moved to a more generic location if others want to use it.

func GetZoneFromClusterName added in v1.7.0

func GetZoneFromClusterName(clusterName string) string

func LoadFederatedConfig

func LoadFederatedConfig(overrides *clientcmd.ConfigOverrides) (*restclient.Config, error)

func LoadFederationClientset

func LoadFederationClientset(config *restclient.Config) (*federation_clientset.Clientset, error)

func MasterUpgrade

func MasterUpgrade(context, version string) error

func NewFederatedTypeCRUDTester added in v1.7.0

func NewFederatedTypeCRUDTester(adapter federatedtypes.FederatedTypeAdapter, clusterClients []kubeclientset.Interface) *crudtester.FederatedTypeCRUDTester

func SkipUnlessFederated

func SkipUnlessFederated(c clientset.Interface)

Detects whether the federation namespace exists in the underlying cluster

func WaitForFederationApiserverReady

func WaitForFederationApiserverReady(c *federation_clientset.Clientset) error

WaitForFederationApiserverReady waits for the federation apiserver to be ready. It tests the readiness by sending a GET request and expecting a non error response.

Types

type Cluster added in v1.7.0

type Cluster struct {
	Name string
	*kubeclientset.Clientset
}

Cluster keeps track of the name and client of a cluster in the federation

type ClusterSlice added in v1.7.0

type ClusterSlice []*Cluster

ClusterSlice is a slice of clusters

type E2EContext

type E2EContext struct {
	// Raw context name,
	RawName string `yaml:"rawName"`
	// A valid dns subdomain which can be used as the name of kubernetes resources.
	Name    string                 `yaml:"name"`
	Cluster *framework.KubeCluster `yaml:"cluster"`
	User    *framework.KubeUser    `yaml:"user"`
}

type Framework

type Framework struct {
	*framework.Framework

	FederationConfig *restclient.Config

	FederationClientset *federation_clientset.Clientset

	FederationNamespace *v1.Namespace
	// contains filtered or unexported fields
}

Framework extends e2e Framework and adds federation specific fields

func NewDefaultFederatedFramework

func NewDefaultFederatedFramework(baseName string) *Framework

func (*Framework) FederationAfterEach

func (f *Framework) FederationAfterEach()

FederationAfterEach deletes the namespace, after reading its events.

func (*Framework) FederationBeforeEach

func (f *Framework) FederationBeforeEach()

FederationBeforeEach checks for federation apiserver is ready and makes a namespace.

func (*Framework) GetClusterClients added in v1.7.0

func (f *Framework) GetClusterClients() []kubeclientset.Interface

func (*Framework) GetRegisteredClusters added in v1.7.0

func (f *Framework) GetRegisteredClusters() ClusterSlice

func (*Framework) GetUnderlyingFederatedContexts

func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext

Jump to

Keyboard shortcuts

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