Documentation ¶
Index ¶
- func GetSSHConfig(name string) (string, *ssh.ClientConfig, error)
- type KindProvider
- func (provider *KindProvider) GetKubeconfigPath() (string, error)
- func (provider *KindProvider) RunCommandOnControlPlaneNode(cmd string) (code int, stdout string, stderr string, err error)
- func (provider *KindProvider) RunCommandOnNode(nodeName string, cmd string) (code int, stdout string, stderr string, err error)
- func (provider *KindProvider) RunCommandOnNodeExt(nodeName, cmd string, envs map[string]string, stdin string, sudo bool) (code int, stdout string, stderr string, err error)
- type ProviderInterface
- type RemoteProvider
- func (p *RemoteProvider) GetKubeconfigPath() (string, error)
- func (p *RemoteProvider) RunCommandOnNode(nodeName string, cmd string) (code int, stdout string, stderr string, err error)
- func (p *RemoteProvider) RunCommandOnNodeExt(nodeName, cmd string, envs map[string]string, stdin string, sudo bool) (code int, stdout, stderr string, err error)
- type VagrantProvider
- func (provider *VagrantProvider) GetKubeconfigPath() (string, error)
- func (provider *VagrantProvider) RunCommandOnNode(nodeName string, cmd string) (code int, stdout string, stderr string, err error)
- func (provider *VagrantProvider) RunCommandOnNodeExt(nodeName, cmd string, envs map[string]string, stdin string, sudo bool) (code int, stdout, stderr string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSSHConfig ¶
func GetSSHConfig(name string) (string, *ssh.ClientConfig, error)
Types ¶
type KindProvider ¶
type KindProvider struct {
// contains filtered or unexported fields
}
func (*KindProvider) GetKubeconfigPath ¶
func (provider *KindProvider) GetKubeconfigPath() (string, error)
func (*KindProvider) RunCommandOnControlPlaneNode ¶
func (*KindProvider) RunCommandOnNode ¶
type ProviderInterface ¶
type ProviderInterface interface { RunCommandOnNode(nodeName string, cmd string) (code int, stdout string, stderr string, err error) // RunCommandOnNodeExt supports passing environment variables and writing the input to stdin. RunCommandOnNodeExt(nodeName, cmd string, envs map[string]string, stdin string, sudo bool) (code int, stdout string, stderr string, err error) GetKubeconfigPath() (string, error) }
Hides away specific characteristics of the K8s cluster. This should enable the same tests to be run on a variety of providers.
func NewKindProvider ¶
func NewKindProvider(configPath string) (ProviderInterface, error)
NewKindProvider returns an implementation of ProviderInterface which is suitable for a Kubernetes test cluster created with Kind. configPath is unused for the kind provider
func NewRemoteProvider ¶
func NewRemoteProvider(configPath string) (ProviderInterface, error)
NewRemoteProvider returns an implementation of ProviderInterface which enables tests to run on a remote cluster. configPath is unused for the remote provider
func NewVagrantProvider ¶
func NewVagrantProvider(configPath string) (ProviderInterface, error)
NewVagrantProvider returns an implementation of ProviderInterface which is suitable for a Kubernetes test cluster created with the provided Vagrantfile. configPath is unused for the vagrant provider
type RemoteProvider ¶
type RemoteProvider struct {
// contains filtered or unexported fields
}
func (*RemoteProvider) GetKubeconfigPath ¶
func (p *RemoteProvider) GetKubeconfigPath() (string, error)
func (*RemoteProvider) RunCommandOnNode ¶
type VagrantProvider ¶
type VagrantProvider struct{}
func (*VagrantProvider) GetKubeconfigPath ¶
func (provider *VagrantProvider) GetKubeconfigPath() (string, error)