utils

package
v0.0.0-...-db4638b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(configpath string) (*kubernetes.Clientset, error)

Client returns a kubernetes client

func CreateCron

func CreateCron(kc *kubernetes.Clientset, name string, namespace string, schedule string) (bool, error)

func CreateJob

func CreateJob(kc *kubernetes.Clientset, name string, namespace string, image string, runid string, taskid string, creds wfv1.MinioCreds) (*batchv1.Job, error)

func CreatePod

func CreatePod(kc *kubernetes.Clientset, name string, namespace string, image string) (*v1.Pod, error)

func DeleteCron

func DeleteCron(kc *kubernetes.Clientset, name string, namespace string) (bool, error)

func DeleteJob

func DeleteJob(kc *kubernetes.Clientset, name string, namespace string) error

func DeleteJobPod

func DeleteJobPod(kc *kubernetes.Clientset, name string, namespace string) error

func DeleteMinio

func DeleteMinio(kc *kubernetes.Clientset, pod *v1.Pod, svc *v1.Service) error

func DeployMinio

func DeployMinio(kc *kubernetes.Clientset, name string, namespace string, creds wfv1.MinioCreds) (*v1.Pod, *v1.Service, error)

func DownloadArtifacts

func DownloadArtifacts(bucket string, url string) error

func GetObjectMetaData

func GetObjectMetaData(obj interface{}) (objectMeta metav1.ObjectMeta)

func MinioCredential

func MinioCredential() string

func ReadArtifactsFolder

func ReadArtifactsFolder(dir string) []string

func Timestamp

func Timestamp() string

func UpdateCron

func UpdateCron(kc *kubernetes.Clientset, name string, namespace string, schedule string) error

func UploadArtifacts

func UploadArtifacts(bucket string, url string, artifacts []string) error

func WatchJob

func WatchJob(kc *kubernetes.Clientset, name string, namespace string) (watch.Interface, error)

func WatchPod

func WatchPod(kc *kubernetes.Clientset, name string, namespace string) (watch.Interface, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL