Documentation ¶
Overview ¶
Package k8s provides kubernetes helper functions
Index ¶
- func ApplyDeployment(path string, mutators ...func(deployment *v1.Deployment)) error
- func Client() (*kubernetes.Clientset, error)
- func NewNamespace() (name string, cleanup func(), err error)
- func Nodes() ([]*corev1.Node, error)
- func SetNamespace(namespace string) func(*v1.Deployment)
- func SetNode(nodeName string) func(*v1.Deployment)
- func ShowLogs(options ...*exechelper.Option)
- func WaitLogsMatch(labelSelector, pattern, namespace string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDeployment ¶
func ApplyDeployment(path string, mutators ...func(deployment *v1.Deployment)) error
ApplyDeployment is analogy of 'kubeclt apply -f path' but with mutating deployment before apply
func NewNamespace ¶
NewNamespace generates new namespace
func SetNamespace ¶
func SetNamespace(namespace string) func(*v1.Deployment)
SetNamespace sets namespace for deployment
func SetNode ¶
func SetNode(nodeName string) func(*v1.Deployment)
SetNode sets NodeSelector for the pod based on passed nodeName
func ShowLogs ¶
func ShowLogs(options ...*exechelper.Option)
ShowLogs prints logs into console all containers of pods
func WaitLogsMatch ¶
WaitLogsMatch waits pattern in logs of deployment. Note: Use this function only for final assertion. Do not use this for wait special state of application. Note: This API should be replaced to using `ping` command.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.