-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update: add selfLink annotation before returning getResource #106
Conversation
all resources returned via kubeclass getResource will include the selfLink annotation
all resources returned via the watchman event objectHandler will include the selfLink annotation
@@ -119,6 +119,15 @@ module.exports = class KubeClass { | |||
} | |||
|
|||
|
|||
injectSelfLink(object, resourceMeta) { | |||
let resources = objectPath.get(object, 'items', []); |
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.
Is it possible to get an individual resource here instead if a list?
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.
the way its making the request let response = await request.get(resourceMeta.uri(), options);
tells me it is always doing a listing, never getting a specific resource. eg. resourceMeta.uri()
doesnt specify a name or namespace in the options, so it will always be a list of resources
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.
Assuming its not, approved. If its possible to get a single, then need to handle that situation
No description provided.