From 55cc810706594c45d8dc150b1e037fe250f648c5 Mon Sep 17 00:00:00 2001 From: streamer45 Date: Fri, 11 Aug 2023 08:46:09 -0600 Subject: [PATCH] Add app label to job/pods to help fetching logs --- service/kubernetes/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/kubernetes/service.go b/service/kubernetes/service.go index 4849323..9b4b271 100644 --- a/service/kubernetes/service.go +++ b/service/kubernetes/service.go @@ -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{ @@ -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{