title: How to update kubernetes job status of a job after being executed through swagger running a container deployment?
body: <p>i have deployed my front end application through a <code>deployment.yaml</code> file using minikube having <code>swagger-ui</code> . This application simply takes in json queries and starts jobs on minikube which runs and terminates relevant containers. 
  currently i have built 1 docker image on my minikube cluster which starts downloading satellite images after the job is started. 
  Now whenever i pass a json query to swagger-ui, it gives me the following  response where the job status is <code>PENDING</code>:</p>
  
  <pre><code>{
    "workflowId": "2a94d0e3-7245-47e4-a9ce-821efce42eb8",
    "workflowName": "monitoring1",
    "status": "PENDING",
    "submittedAt": "2019-08-29T08:22:59.599469Z",
    "completedAt": null,
    "jobs": [
  </code></pre>
  
  <p><strong>Job watcher</strong></p>
  
  <pre><code>var jobStatus = JobStatus.PENDING
          when (action) {
              Watcher.Action.ADDED -&gt; {
                  if (job.status.startTime != null &amp;&amp; job.status.active &gt;= 0) {
                      jobStatus = JobStatus.RUNNING
                  }
              }
              Watcher.Action.MODIFIED -&gt; {
                  if (job.status.completionTime != null &amp;&amp; job.status.succeeded &gt;= 0) {
                      jobStatus = JobStatus.COMPLETED
                  } else if (job.status.failed != null) {
                      jobStatus = JobStatus.ERROR
                  }
              }
              Watcher.Action.DELETED -&gt; {
                  log.info("DELETED")
              }
              Watcher.Action.ERROR -&gt; {
                  jobStatus = JobStatus.ERROR
              }
          }
  
  </code></pre>
  
  <p>on the minikuber side, the job starts and terminates after some time but on the side of swagger, the status of job never changes. However, when i try to run a <code>GET</code> query to list all jobs, there i see the completed job. <strong>My question is how can i update status or notify the user once the job completes?</strong>.</p>