cetokjob

package
v0.0.0-...-dc0ca79 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobConfig

type JobConfig struct {
	Name      string   `json:"name"`
	Image     string   `json:"image"`
	Command   []string `json:"command"`
	Args      []string `json:"args"`
	Configmap string   `json:"configmap"`
	Secret    string   `json:"secret"`
}

JobConfig represents the configuration of a job.

func LoadJobConfig

func LoadJobConfig(path string) ([]JobConfig, error)

LoadJobConfig reads the configuration file and returns []JobConfig

type JobGenerator

type JobGenerator struct {
	// Configs of job to be Generated
	JobConfigs []JobConfig
	// contains filtered or unexported fields
}

JobGenerator is an object to generate jobs

func NewJobGenerator

func NewJobGenerator(ns string, clientset kubernetes.Interface, jcs []JobConfig) *JobGenerator

NewJobGenerator generate JobGenerator

func (*JobGenerator) GenerateJob

func (creator *JobGenerator) GenerateJob(envMap map[string]string) ([]batchv1.Job, error)

GenerateJob creates a job by adding environment variables to a specified job

Jump to

Keyboard shortcuts

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