Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use getObjectStream with a CRD? #517

Closed
craicoverflow opened this issue Jul 17, 2019 · 2 comments · Fixed by #524
Closed

How do I use getObjectStream with a CRD? #517

craicoverflow opened this issue Jul 17, 2019 · 2 comments · Fixed by #524

Comments

@craicoverflow
Copy link

craicoverflow commented Jul 17, 2019

I've followed the documentation to move from the deprecated getStream to getObjectStream. For example, the following works fine:

const events = await client.api.v1.watch.namespaces(namespace).pods.getObjectStream()

But I cannot use getObjectStream with a CRD.

const stream = await kubeclient.apis['test.api.group'].v1alpha1.watch
      .namespaces(namespace)
      .apples.getStream();

I am getting the deprecation warning below, so I assume getObjectStream should be used. Could you please point me to an example of how to do this?

kubernetes-client deprecated .getStream see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md server/appServices.js:67:22

I checked the documentation, using-crds.js and watch.js do not provide examples for this scenario.

@silasbw
Copy link
Contributor

silasbw commented Jul 23, 2019

included fix in [email protected]

@huineng
Copy link

huineng commented May 1, 2020

i still have this, even in version 9 (for CRD)

kubernetes-client deprecated .getStream use .getObjectStream, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md 

Property 'getObjectStream' does not exist on type 'ApiV1WatchEvents'.ts(2339)

kdamedhaar added a commit to kdamedhaar/k8-client that referenced this issue Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants