-
Notifications
You must be signed in to change notification settings - Fork 192
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
Delete resource bugfix #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Have you tried using the newer API documented in the README.md? I don't think it has this issue.
@@ -91,6 +91,8 @@ class BaseObject extends CallableObject { | |||
options = {}; | |||
} else if (typeof options === 'string') { | |||
options = { name: options }; | |||
} else if (typeof options === 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you calling delete? Are you also leaving cb
undefined? If so, won't this.api.delete
fail when it invokes the cb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I've been using this lib since version 3 and only update version, but not a code.
Here is example of using
const api = new Api.Api(k8sConfig); //get config from file
this.api = api.group(apiVersion); //use batch/v1 for jobs
...
await this.api.ns(defaultNS).jobs(jobName).delete();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passing empty object into delete method works well, but it isn't documented
Ok, sounds good. Can you remove your changes to |
This reverts commit e1c204c.
done. |
When trying to delete resource with ...delete() it causes exception "Cannot read property 'qs' of undefined".