<p>I'm using AKS and K8s golang API. </p>

<p>I'm creating a Kubernetes watcher for watching jobs like </p>

<pre><code>watchres, error := jobsClient.Watch(metav1.ListOptions{})
</code></pre>

<p>After that i'm getting the events channel like </p>

<pre><code>eventres := watchres.ResultChan()
</code></pre>

<p>After that i'm getting events in a loop using </p>

<pre><code>we := &lt;-eventres
</code></pre>

<p>then on the basis of these event i'm performing some action (for example delete a resource when kubernetes job gets successful)</p>

<p>The issue i am facing is that everything seems to work fine but after some period of time the watcher does not delete resources however the jobs gets successful, what might be the issue, is there a timeout for the channel?? however i'm not closing the channel implicitly.</p>

UmairAhmad
<p>There is a default timeout on the watch. I believe it is set to 30 minutes.</p>

<p>You can override this value in <code>ListOptions</code>. So for example, to set the timeout to an hour:</p>

<pre><code>timeout := int64(3600)
watchres, error := jobsClient.Watch(metav1.ListOptions{
    TimeoutSeconds: &amp;timeout,
})
</code></pre>
