func NewJob(name, namespace string) *Job {
	j := &Job{
		APIVersion: "extensions/v1beta1",
		Kind:       "Job",
		Metadata:   make(map[string]interface{}),
		Spec: &JobSpec{
			Selector: &JobSelector{
				MatchLabels: make(map[string]string),
			},
			Template: &JobSpecTemplate{
				Metadata: make(map[string]interface{}),
				Spec: &PodSpec{
					RestartPolicy: NeverRestart,
					Volumes:       make([]*Volume, 0),
					Containers:    make([]*Container, 0),
				},
			},
		},
	}
	j.AddMetadata("name", name)
	j.AddMetadata("namespace", namespace)
	return j
}
NewJob creates a new Job with default values
package kube
type (
	RestartPolicyType string
	ProtocolType string
)
const (
	RestartOnFailure RestartPolicyType = "OnFailure"
	NeverRestart RestartPolicyType = "Never"
	UDP ProtocolType = "UDP"
	TCP ProtocolType = "TCP"
)
type Job struct {
	APIVersion string                 `json:"apiVersion,omitempty"`
	Kind       string                 `json:"kind,omitempty"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
	Spec       *JobSpec               `json:"spec,omitempty"`
	Status     *struct {
		Active     int `json:"active,omitempty"`
		Succeeded  int `json:"succeeded,omitempty"`
		Failed     int `json:"failed,omitempty"`
		Conditions []struct {
			Status string `json:"status,omitempty"`
			Type   string `json:"type,omitempty"`
		} `json:"conditions,omitempty"`
	} `json:"status,omitempty"`
}