Documentation ¶
Index ¶
- type Framework
- func (f *Framework) ApplyTemplatedManifests(fsys fs.FS, manifestGlob string, templateMapping map[string]interface{}, ...) error
- func (f *Framework) CreateAutomanagedNamespaces(namespaceCount int, allowExistingNamespaces bool, ...) error
- func (f *Framework) CreateObject(namespace string, name string, obj *unstructured.Unstructured, ...) error
- func (f *Framework) DeleteAutomanagedNamespaces(timeout time.Duration) *errors.ErrorList
- func (f *Framework) DeleteNamespaces(namespaces []string, timeout time.Duration) *errors.ErrorList
- func (f *Framework) DeleteObject(gvk schema.GroupVersionKind, namespace string, name string, ...) error
- func (f *Framework) GetAutomanagedNamespacePrefix() string
- func (f *Framework) GetClientSets() *MultiClientSet
- func (f *Framework) GetClusterConfig() *config.ClusterConfig
- func (f *Framework) GetDiscoveryClient() *discovery.DiscoveryClient
- func (f *Framework) GetDynamicClients() *MultiDynamicClient
- func (f *Framework) GetObject(gvk schema.GroupVersionKind, namespace string, name string, ...) (*unstructured.Unstructured, error)
- func (f *Framework) GetRestClient() *restclient.Config
- func (f *Framework) ListAutomanagedNamespaces() ([]string, []string, error)
- func (f *Framework) PatchObject(namespace string, name string, obj *unstructured.Unstructured, ...) error
- func (f *Framework) SetAutomanagedNamespacePrefix(nsName string)
- type MultiClientSet
- type MultiDynamicClient
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(fsys fs.FS, 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, allowExistingNamespaces bool, deleteAutomanagedNamespaces bool) 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 ¶
DeleteAutomanagedNamespaces deletes all automanged namespaces.
func (*Framework) DeleteNamespaces ¶
DeleteNamespaces deletes the list of namespaces.
func (*Framework) DeleteObject ¶
func (f *Framework) DeleteObject(gvk schema.GroupVersionKind, namespace string, name string, _ ...*client.APICallOptions) error
DeleteObject deletes object with given name and group-version-kind.
func (*Framework) GetAutomanagedNamespacePrefix ¶
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) GetDiscoveryClient ¶
func (f *Framework) GetDiscoveryClient() *discovery.DiscoveryClient
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, _ ...*client.APICallOptions) (*unstructured.Unstructured, error)
GetObject retrieves object with given name and group-version-kind.
func (*Framework) GetRestClient ¶
func (f *Framework) GetRestClient() *restclient.Config
func (*Framework) ListAutomanagedNamespaces ¶
ListAutomanagedNamespaces returns all existing automanged namespace names.
func (*Framework) PatchObject ¶
func (f *Framework) PatchObject(namespace string, name string, obj *unstructured.Unstructured, _ ...*client.APICallOptions) error
PatchObject updates object (using patch) with given name using given object description.
func (*Framework) SetAutomanagedNamespacePrefix ¶
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.