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

Update: add selfLink annotation before returning getResource #106

Merged
merged 8 commits into from
Aug 25, 2020

Conversation

alewitt2
Copy link
Member

No description provided.

@alewitt2 alewitt2 requested a review from adamkingit August 25, 2020 19:21
@@ -119,6 +119,15 @@ module.exports = class KubeClass {
}


injectSelfLink(object, resourceMeta) {
let resources = objectPath.get(object, 'items', []);
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@adamkingit adamkingit left a 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

@alewitt2 alewitt2 merged commit 2c9611a into master Aug 25, 2020
@alewitt2 alewitt2 deleted the selfLink branch August 25, 2020 23:12
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 this pull request may close these issues.

2 participants