Skip to content

Add KubernetesObjectApi#446

Merged
k8s-ci-robot merged 2 commits intokubernetes-client:masterfrom
ddgenome:object-api
May 18, 2020
Merged

Add KubernetesObjectApi#446
k8s-ci-robot merged 2 commits intokubernetes-client:masterfrom
ddgenome:object-api

Conversation

@ddgenome
Copy link
Copy Markdown

Add generic object API that dynamically determines endpoint based on
the provided spec. Add KubernetesObjectApi to index exports. Provide
tests and example usage.

Closes #375

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 11, 2020
@k8s-ci-robot k8s-ci-robot requested review from drubin and mbohlool May 11, 2020 21:23
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @ddgenome!

It looks like this is your first PR to kubernetes-client/javascript 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/javascript has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 11, 2020
@ddgenome
Copy link
Copy Markdown
Author

One thing to note here is that I changed the makeApiClient semantics to allow for the generic API to more closely mimic the behavior of kubectl. Specifically, I needed to determine if namespace is set in the current context and default to that value. If it is more desirable to maintain the makeApiClient semantics, that functionality can be removed and this can just default to the "default" namespace.

@ddgenome ddgenome force-pushed the object-api branch 2 times, most recently from 765ab09 to c52b8c1 Compare May 12, 2020 21:31
Comment thread src/object.ts Outdated
Comment thread src/object.ts Outdated
Comment thread src/object.ts
@brendandburns
Copy link
Copy Markdown
Contributor

Thanks for the PR. I had a few comments. The only substantial one is wrt to caching the API info lookup.

ddgenome pushed a commit to ddgenome/javascript that referenced this pull request May 14, 2020
ddgenome pushed a commit to ddgenome/javascript that referenced this pull request May 14, 2020
@ddgenome ddgenome requested a review from brendandburns May 14, 2020 21:38
Add generic object API that dynamically determines endpoint based on
the provided spec.  Add KubernetesObjectApi to index exports.  Provide
tests and example usage.

Closes kubernetes-client#375
ddgenome pushed a commit to ddgenome/javascript that referenced this pull request May 17, 2020
Remove simple static values and methods.  Add cache for API resource
response.
@ddgenome
Copy link
Copy Markdown
Author

All review comments provided thus far have been addressed.

Remove simple static values and methods.  Add cache for API resource
response.
@brendandburns
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, ddgenome

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2020
@k8s-ci-robot k8s-ci-robot merged commit 9aeafe2 into kubernetes-client:master May 18, 2020
@ddgenome ddgenome deleted the object-api branch May 19, 2020 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interest in generic object API class

3 participants