Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions handlers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Container struct {
PullPolicy k8sv1.PullPolicy `json:"pull_policy"`
Env []k8sv1.EnvVar `json:"env"`
VolumesMounts []k8sv1.VolumeMount `json:"volumeMounts"`
Labels map[string]string `json:"labels"`
CPULimit string `json:"cpu-limit"`
MemoryLimit string `json:"memory-limit"`
}
Expand Down
5 changes: 5 additions & 0 deletions handlers/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ func createK8sJob(currentAction string, inputData string, accessFormat string, a
labels := make(map[string]string)
labels["app"] = "sowerjob"
labels["username"] = username
if len(conf.Container.Labels) != 0 {
for k, v := range conf.Container.Labels {
labels[k] = v
}
}

annotations := make(map[string]string)
annotations["gen3username"] = userName
Expand Down