We realise getStream() is deprecated, but getObjectStream() is undefined for this path. If the custom resource is v1alpha1 not sure if there is a better way to watch changes on it?
Using the deprecated getStream(), the event is triggered only the first time. When editing the resource again, this event does not get triggered at all from that point on.
Not sure if there is a new way to approach this problem of doing a watch event on custom resources that may have different versions (v1, v1beta1, v1alpha1, etc)?
Edit: The way the client is loaded is:
let Client = require('kubernetes-client').Client;
let Request = require('kubernetes-client/backends/request');
backend = new Request(Request.config.getInCluster());
client = new Client({ backend: backend });
await client.loadSpec();
realised it is necessary to addCustomResourceDefinition in order for path to .watch be available. Is there a way to do this without explicitly loading each custom resource definition to the client?
Hi guys,
we realised that using:
client.apis['some.api'].watch.some_plural.getStream()
is no longer supported in 9.0.0.We tried to do:
We realise getStream() is deprecated, but getObjectStream() is undefined for this path. If the custom resource is v1alpha1 not sure if there is a better way to watch changes on it?
Using the deprecated getStream(), the event is triggered only the first time. When editing the resource again, this event does not get triggered at all from that point on.
Not sure if there is a new way to approach this problem of doing a watch event on custom resources that may have different versions (v1, v1beta1, v1alpha1, etc)?
Edit: The way the client is loaded is:
Thanks