Documentation ¶
Index ¶
- func CloneGitRepo(url string) error
- func CloneGitRepoWithBranch(url, branch string) error
- func DeleteGitRepo(path string) error
- func DestroyPod(ctx context.Context, ns, labelSelector string, c kubernetes.Interface) error
- func GetConfigmap(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.ConfigMap, error)
- func GetContentFromURL(url string, timeout time.Duration) string
- func GetCurrentNamespace() string
- func GetDeployment(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.Deployment, error)
- func GetDeploymentList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.Deployment, error)
- func GetOktetoPath() (string, error)
- func GetPodsBySelector(ctx context.Context, ns, selector string, client kubernetes.Interface) (*corev1.PodList, error)
- func GetService(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.Service, error)
- func GetStatefulset(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.StatefulSet, error)
- func GetStatefulsetList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.StatefulSet, error)
- func GetTestNamespace(name string) string
- func GetToken() string
- func GetVolume(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.PersistentVolumeClaim, error)
- func GitInit(path string) error
- func K8sClient() (*kubernetes.Clientset, *rest.Config, error)
- func RunOktetoVersion(oktetoPath string) (string, error)
- func SkipIfNotOktetoCluster(t *testing.T)
- func SkipIfWindows(t *testing.T)
- func UpdateDeployment(ctx context.Context, ns string, d *appsv1.Deployment, ...) error
- func UpdateStatefulset(ctx context.Context, ns string, sfs *appsv1.StatefulSet, ...) error
- func WaitForDeployment(kubectlBinary string, kubectlOpts *commands.KubectlOptions, revision int, ...) error
- func WaitForStatefulset(kubectlBinary string, kubectlOpts *commands.KubectlOptions, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneGitRepoWithBranch ¶
CloneGitRepoWithBranch clones a repo by its URL in an specific branch
func DeleteGitRepo ¶
DeleteGitRepo deletes the path passed as argument
func DestroyPod ¶
DestroyPod returns a deployment given a namespace and name
func GetConfigmap ¶
func GetConfigmap(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.ConfigMap, error)
GetConfigmap returns a configmap given name and namespace
func GetContentFromURL ¶
GetContentFromURL returns the content of the url
func GetCurrentNamespace ¶
func GetCurrentNamespace() string
GetCurrentNamespace returns the current namespace of the kubeconfig path
func GetDeployment ¶
func GetDeployment(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.Deployment, error)
GetDeployment returns a deployment given a namespace and name
func GetDeploymentList ¶
func GetDeploymentList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.Deployment, error)
GetDeploymentList returns all deployments given a namespace
func GetOktetoPath ¶
GetOktetoPath returns the okteto path used to run tests set OKTETO_PATH to the bin you want to test otherwise it'll use the one you have in your path
func GetPodsBySelector ¶
func GetService ¶
func GetService(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.Service, error)
GetService returns a service given a namespace and a name
func GetStatefulset ¶
func GetStatefulset(ctx context.Context, ns, name string, client kubernetes.Interface) (*appsv1.StatefulSet, error)
GetStatefulset returns a sfs given a namespace and name
func GetStatefulsetList ¶
func GetStatefulsetList(ctx context.Context, ns string, client kubernetes.Interface) ([]appsv1.StatefulSet, error)
GetStatefulsetList returns all sfs given a namespace
func GetTestNamespace ¶
GetTestNamespace returns the name for a namespace
func GetVolume ¶
func GetVolume(ctx context.Context, ns, name string, client kubernetes.Interface) (*corev1.PersistentVolumeClaim, error)
GetVolume returns a volume given a namespace and name
func K8sClient ¶
func K8sClient() (*kubernetes.Clientset, *rest.Config, error)
K8sClient returns a kubernetes client for current KUBECONFIG
func RunOktetoVersion ¶
RunOktetoVersion runs okteto version given an oktetoPath
func SkipIfNotOktetoCluster ¶
SkipIfNotOktetoCluster skips a tests if is not on an okteto cluster
func SkipIfWindows ¶
SkipIfWindows skips a tests if is on a windows environment
func UpdateDeployment ¶
func UpdateDeployment(ctx context.Context, ns string, d *appsv1.Deployment, client kubernetes.Interface) error
UpdateDeployment updates a current deployment
func UpdateStatefulset ¶
func UpdateStatefulset(ctx context.Context, ns string, sfs *appsv1.StatefulSet, client kubernetes.Interface) error
UpdateStatefulset updates a statefulset
func WaitForDeployment ¶
func WaitForDeployment(kubectlBinary string, kubectlOpts *commands.KubectlOptions, revision int, timeout time.Duration) error
WaitForDeployment waits until a deployment is rollout correctly
func WaitForStatefulset ¶
func WaitForStatefulset(kubectlBinary string, kubectlOpts *commands.KubectlOptions, timeout time.Duration) error
WaitForStatefulset waits until a sfs is rollout correctly
Types ¶
This section is empty.