framework

package
v0.0.0-...-a426a1e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Framework

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

Framework allows for interacting with Kubernetes cluster via official Kubernetes client.

func NewFramework

func NewFramework(clusterConfig *config.ClusterConfig, clientsNumber int) (*Framework, error)

NewFramework creates new framework based on given clusterConfig.

func NewRootFramework

func NewRootFramework(clusterConfig *config.ClusterConfig, clientsNumber int) (*Framework, error)

NewRootFramework creates framework for the root cluster. For clusters other than kubemark there is no difference between NewRootFramework and NewFramework.

func (*Framework) ApplyTemplatedManifests

func (f *Framework) ApplyTemplatedManifests(manifestGlob string, templateMapping map[string]interface{}, options ...*client.ApiCallOptions) error

ApplyTemplatedManifests finds and applies all manifest template files matching the provided manifestGlob pattern. It substitutes the template placeholders using the templateMapping map.

func (*Framework) CreateAutomanagedNamespaces

func (f *Framework) CreateAutomanagedNamespaces(namespaceCount int) error

CreateAutomanagedNamespaces creates automanged namespaces.

func (*Framework) CreateObject

func (f *Framework) CreateObject(namespace string, name string, obj *unstructured.Unstructured, options ...*client.ApiCallOptions) error

CreateObject creates object base on given object description.

func (*Framework) DeleteAutomanagedNamespaces

func (f *Framework) DeleteAutomanagedNamespaces() *errors.ErrorList

DeleteAutomanagedNamespaces deletes all automanged namespaces.

func (*Framework) DeleteNamespaces

func (f *Framework) DeleteNamespaces(namespaces []string) *errors.ErrorList

DeleteNamespaces deletes the list of namespaces.

func (*Framework) DeleteObject

func (f *Framework) DeleteObject(gvk schema.GroupVersionKind, namespace string, name string, options ...*client.ApiCallOptions) error

DeleteObject deletes object with given name and group-version-kind.

func (*Framework) GetAutomanagedNamespacePrefix

func (f *Framework) GetAutomanagedNamespacePrefix() string

GetAutomanagedNamespacePrefix returns automanaged namespace prefix.

func (*Framework) GetClientSets

func (f *Framework) GetClientSets() *MultiClientSet

GetClientSets returns clientSet clients.

func (*Framework) GetClusterConfig

func (f *Framework) GetClusterConfig() *config.ClusterConfig

GetClusterConfig returns cluster config.

func (*Framework) GetDynamicClients

func (f *Framework) GetDynamicClients() *MultiDynamicClient

GetDynamicClients returns dynamic clients.

func (*Framework) GetObject

func (f *Framework) GetObject(gvk schema.GroupVersionKind, namespace string, name string, options ...*client.ApiCallOptions) (*unstructured.Unstructured, error)

GetObject retrieves object with given name and group-version-kind.

func (*Framework) ListAutomanagedNamespaces

func (f *Framework) ListAutomanagedNamespaces() ([]string, []string, error)

ListAutomanagedNamespaces returns all existing automanged namespace names.

func (*Framework) PatchObject

func (f *Framework) PatchObject(namespace string, name string, obj *unstructured.Unstructured, options ...*client.ApiCallOptions) error

PatchObject updates object (using patch) with given name using given object description.

func (*Framework) SetAutomanagedNamespacePrefix

func (f *Framework) SetAutomanagedNamespacePrefix(nsName string)

SetAutomanagedNamespacePrefix sets automanaged namespace prefix.

type MultiClientSet

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

MultiClientSet is a set of kubernetes clients.

func NewMultiClientSet

func NewMultiClientSet(kubeconfigPath string, number int) (*MultiClientSet, error)

NewMultiClientSet creates new MultiClientSet for given kubeconfig and number.

func (*MultiClientSet) GetClient

func (m *MultiClientSet) GetClient() clientset.Interface

GetClient return one client instance from the set using round robin.

type MultiDynamicClient

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

MultiDynamicClient is a set of dynamic client.

func NewMultiDynamicClient

func NewMultiDynamicClient(kubeconfigPath string, number int) (*MultiDynamicClient, error)

NewMultiDynamicClient creates new MultiDynamicClient for given kubeconfig and number.

func (*MultiDynamicClient) GetClient

func (m *MultiDynamicClient) GetClient() dynamic.Interface

GetClient return one client instance from the set using round robin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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