Skip to content

Commit

Permalink
Add app label to job/pods to help fetching logs
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Aug 11, 2023
1 parent f55554f commit 55cc810
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions service/kubernetes/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ func (s *JobService) CreateJob(cfg job.Config, onStopCb job.StopCb) (job.Job, er
Labels: map[string]string{
// Using a custom label to easily watch the job.
"job_name": jobName,
// app label helps with fetching logs.
"app": "mattermost-calls-offloader",
},
},
Spec: batchv1.JobSpec{
Expand All @@ -180,6 +182,8 @@ func (s *JobService) CreateJob(cfg job.Config, onStopCb job.StopCb) (job.Job, er
Labels: map[string]string{
// Using a custom label to easily retrieve the pod later on.
"job_name": jobName,
// app label helps with fetching logs.
"app": "mattermost-calls-offloader",
},
},
Spec: corev1.PodSpec{
Expand Down

0 comments on commit 55cc810

Please sign in to comment.