Documentation ¶
Index ¶
- func AppendSecretVolume(volumes *[]apiv1.Volume, mounts *[]apiv1.VolumeMount, name string, path string)
- func AssertJob(t *testing.T, job *batchv1.Job)
- func CreateResourcesFromYAML(vanClient *client.VanClient, fileOrUrl string) error
- func CreateTestJob(ns string, kubeClient kubernetes.Interface, name string, command []string) (*batchv1.Job, error)
- func CreateTestJobWithSecret(ns string, kubeClient kubernetes.Interface, name string, command []string, ...) (*batchv1.Job, error)
- func DeleteNamespaceAndWait(kubeClient kubernetes.Interface, name string) error
- func Execute(kubeClient kubernetes.Interface, config *rest.Config, ns string, ...) (bytes.Buffer, bytes.Buffer, error)
- func GetJobLogs(ns string, kubeClient kubernetes.Interface, name string) (string, error)
- func GetJobsLogs(ns string, kubeClient kubernetes.Interface, name string, all bool) (string, error)
- func GetTestImage() string
- func GetTestImagePullPolicy() apiv1.PullPolicy
- func NewDeployment(name, namespace string, opts DeploymentOpts) (*v1.Deployment, error)
- func NewJob(name, namespace string, opts JobOpts) *batchv1.Job
- func WaitForJob(ns string, kubeClient kubernetes.Interface, jobName string, ...) (*batchv1.Job, error)
- func WaitForServiceToBeAvailable(ns string, kubeClient kubernetes.Interface, name string, timeout time.Duration) (service *apiv1.Service, err error)
- func WaitForServiceToBeAvailableDefaultTimeout(ns string, kubeClient kubernetes.Interface, name string) (service *apiv1.Service, err error)
- func WaitForServiceToBeCreated(ns string, kubeClient kubernetes.Interface, name string, ...) (*apiv1.Service, error)
- func WaitForServiceToBeCreatedAndReadyToUse(ns string, kubeClient kubernetes.Interface, serviceName string, ...) (*apiv1.Service, error)
- func WaitForSkupperServiceToBeCreatedAndReadyToUse(ns string, kubeClient kubernetes.Interface, serviceName string) (*apiv1.Service, error)
- type DeploymentOpts
- type JobOpts
- type SecretMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSecretVolume ¶
func CreateResourcesFromYAML ¶
CreateResourcesFromYAML creates all resources from the provided YAML file or URL using an initialized VanClient instance.
func CreateTestJob ¶
func CreateTestJobWithSecret ¶
func DeleteNamespaceAndWait ¶
func DeleteNamespaceAndWait(kubeClient kubernetes.Interface, name string) error
func Execute ¶
func Execute(kubeClient kubernetes.Interface, config *rest.Config, ns string, pod, container string, command []string) (bytes.Buffer, bytes.Buffer, error)
Execute helps executing commands on a given pod, using the k8s rest api returning stdout, stderr, err This function is nil safe and so stdout and stderr are always returned
func GetJobLogs ¶
func GetJobsLogs ¶
Returns the logs of the pods related to a given job. If 'all' is true, all runs will be returned; failures to get individual logs will be reported on the output, but not cause the function to fail.
If 'all' is false, only the last run's logs will be returned.
func GetTestImage ¶
func GetTestImage() string
func GetTestImagePullPolicy ¶
func GetTestImagePullPolicy() apiv1.PullPolicy
Allows to control when Skupper test images (quay.io/skupper/skupper-tests) will be pulled. The variable is TEST_IMAGE_PULL_POLICY, and the accepted values are PullIfNotPresent, PullNever and PullAlways (the default, if none set). If an invalid value is provided, it is passed as-is to K8S, which may refuse it.
func NewDeployment ¶
func NewDeployment(name, namespace string, opts DeploymentOpts) (*v1.Deployment, error)
func WaitForJob ¶
Types ¶
type DeploymentOpts ¶
type DeploymentOpts struct { Image string Labels map[string]string RestartPolicy v12.RestartPolicy Command []string Args []string EnvVars []v12.EnvVar ResourceReq v12.ResourceRequirements SecretMounts []SecretMount }