Documentation ¶
Overview ¶
Package util provides various helper routines.
Index ¶
- func AddPodsEventHandler(inf cache.SharedInformer, queue workqueue.RateLimitingInterface)
- func BuildResourceTemplate(stepName string, action string, manifest string, successCondition string, ...) workflow_v1.Template
- func BuildStep(stepName string, template string, argParams workflow_v1.Arguments) workflow_v1.WorkflowStep
- func BuildTemplate(stepName string, image string, command []string, envVars []apiv1.EnvVar, ...) workflow_v1.Template
- func ConvertEnvVarsToString(envs []apiv1.EnvVar) string
- func ConvertKubebenchJobToArgoWorkflow(kbJob *kubebenchjob.KubebenchJob) (wkflw *workflow_v1.Workflow, err error)
- func ConvertVolumeMountsToString(vMounts []apiv1.VolumeMount) string
- func ConvertVolumesToString(volumes []apiv1.Volume) string
- func CreateArgumentsForString(names []string, values []string) workflow_v1.Arguments
- func CreateInputs(names []string) workflow_v1.Inputs
- func CreateKeyValuePairs(m map[string]string) string
- func CreateOutputs(names []string, paths []string) workflow_v1.Outputs
- func CreateWorkingQueue() workqueue.RateLimitingInterface
- func GenerateJobFromParameters(parameters map[string]string) (job *kubebenchjob.KubebenchJob, err error)
- func GetJobName(kbJob *kubebenchjob.KubebenchJob) (name string)
- func GetPodsSharedIndexInformer(client kubernetes.Interface) cache.SharedIndexInformer
- func GetTeamsSharedIndexInformer(client kubernetes.Interface, ...) cache.SharedIndexInformer
- func Pformat(value interface{}) string
- func RandString(n int) string
- func ReadResourcesFromYAML(reader io.Reader) ([]unstructured.Unstructured, error)
- func Run(command []string, dir string, env []string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPodsEventHandler ¶ added in v0.4.0
func AddPodsEventHandler(inf cache.SharedInformer, queue workqueue.RateLimitingInterface)
func BuildResourceTemplate ¶ added in v0.4.0
func BuildResourceTemplate(stepName string, action string, manifest string, successCondition string, failureCondition string, inParams workflow_v1.Inputs, outParams workflow_v1.Outputs) workflow_v1.Template
func BuildStep ¶ added in v0.4.0
func BuildStep(stepName string, template string, argParams workflow_v1.Arguments) workflow_v1.WorkflowStep
func BuildTemplate ¶ added in v0.4.0
func BuildTemplate(stepName string, image string, command []string, envVars []apiv1.EnvVar, volMnts []apiv1.VolumeMount, inParams workflow_v1.Inputs, outParams workflow_v1.Outputs) workflow_v1.Template
func ConvertEnvVarsToString ¶ added in v0.4.0
func ConvertKubebenchJobToArgoWorkflow ¶ added in v0.4.0
func ConvertKubebenchJobToArgoWorkflow(kbJob *kubebenchjob.KubebenchJob) (wkflw *workflow_v1.Workflow, err error)
!TODO ADD DATA VOLUME
func ConvertVolumeMountsToString ¶ added in v0.4.0
func ConvertVolumeMountsToString(vMounts []apiv1.VolumeMount) string
func ConvertVolumesToString ¶ added in v0.4.0
func CreateArgumentsForString ¶ added in v0.4.0
func CreateArgumentsForString(names []string, values []string) workflow_v1.Arguments
func CreateInputs ¶ added in v0.4.0
func CreateInputs(names []string) workflow_v1.Inputs
func CreateKeyValuePairs ¶ added in v0.4.0
func CreateOutputs ¶ added in v0.4.0
func CreateOutputs(names []string, paths []string) workflow_v1.Outputs
func CreateWorkingQueue ¶ added in v0.4.0
func CreateWorkingQueue() workqueue.RateLimitingInterface
func GenerateJobFromParameters ¶ added in v0.4.0
func GenerateJobFromParameters(parameters map[string]string) (job *kubebenchjob.KubebenchJob, err error)
func GetJobName ¶ added in v0.4.0
func GetJobName(kbJob *kubebenchjob.KubebenchJob) (name string)
func GetPodsSharedIndexInformer ¶ added in v0.4.0
func GetPodsSharedIndexInformer(client kubernetes.Interface) cache.SharedIndexInformer
func GetTeamsSharedIndexInformer ¶ added in v0.4.0
func GetTeamsSharedIndexInformer(client kubernetes.Interface, kubebenchjobclient kubebenchjobclientset.Interface) cache.SharedIndexInformer
func Pformat ¶
func Pformat(value interface{}) string
Pformat returns a pretty format output of any value that can be marshaled to JSON.
func RandString ¶
RandString generates a random string of the desired length.
The string is DNS-1035 label compliant; i.e. its only alphanumeric lowercase. From: https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang
func ReadResourcesFromYAML ¶ added in v0.6.0
func ReadResourcesFromYAML(reader io.Reader) ([]unstructured.Unstructured, error)
ReadResourcesFromYAML reads in k8s resources as a list of Unstructured from YAML input
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.