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

Add implementation for kapp-controller GetAvailablePackages. #2838

Merged
merged 2 commits into from
May 21, 2021

Conversation

absoludity
Copy link
Contributor

@absoludity absoludity commented May 19, 2021

Description of the change

Adds the implementation for the kapp_controller plugin's GetAvailablePackages endpoint.

While port-forwarding to the kubeapps-apis service with

kubectl -n kubeapps port-forward svc/kubeapps-internal-kubeappsapis 8080:8080

http endpoint responds with:

curl -s http://localhost:8080/kapp_controller/packages/v1alpha1 | jq .
{
  "packages": [
    {
      "name": "app1.example.com",
      "version": "0.11.3",
      "iconUrl": "",
      "repository": null
    },
    {
      "name": "app2.example.com",
      "version": "3.11.3",
      "iconUrl": "",
      "repository": null
    },

while with grpcurl:

grpcurl -plaintext localhost:8080 kubeappsapis.plugins.kapp_controller.packages.v1alpha1.PackagesService.GetAvailablePackages
{
  "packages": [
    {
      "name": "app1.example.com",
      "version": "0.11.3"
    },
    {
      "name": "app2.example.com",
      "version": "3.11.3"
    },
    ...

Note: I still need to check the fake dynamic client to see the form unit-tests will take. I'll those in a subsequent PR.

Benefits

Demonstrate using the dynamic client to query the plugin backend.

Applicable issues

@absoludity absoludity requested a review from antgamdia May 19, 2021 11:52
@absoludity absoludity changed the title Add implementation for kapp-controlleg GetAvailablePackages. Add implementation for kapp-controllen GetAvailablePackages. May 19, 2021
@absoludity absoludity changed the title Add implementation for kapp-controllen GetAvailablePackages. Add implementation for kapp-controller GetAvailablePackages. May 19, 2021
@absoludity absoludity merged commit 1f9549b into master May 21, 2021
@absoludity absoludity deleted the add-kubeapps-apis-service-5 branch May 21, 2021 01:34
@absoludity
Copy link
Contributor Author

Rubber-stamping this PR since it affects only the experimental apis service and the following PR (#2840) is ready to land and will unblock others from being able to work on this too.

Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I didn't manage to have a look at this on time :S (sorry!)
I've installed Carvel tools, installed a Package and a PackageRepository and the API works perfectly. Thank you!

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.

None yet

2 participants