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

Helm proxy not retrieving all releases #435

Closed
migmartri opened this issue Aug 6, 2018 · 0 comments
Closed

Helm proxy not retrieving all releases #435

migmartri opened this issue Aug 6, 2018 · 0 comments
Assignees
Labels
kind/bug An issue that reports a defect in an existing feature

Comments

@migmartri
Copy link
Contributor

I have noticed a couple of issues with the Helm proxy, all of them related to the fact of having a number of releases over 512.

For example, I have a cluster with 862 releases (including deleted)

helm list -a -m 10000 | wc -l
862

But our proxy returns 512

curl 'http://localhost:8080/api/tiller-deploy/v1/releases' [REDACTED] | jq ".data|length"
512

This also affects when asking for releases in a specific namespace. For example, helm tiller only shows the first 3 releases

# Helm list return 27 releases
helm list -a --namespace miguel | wc -l
28

# But helm list only the first ones
curl 'http://localhost:8080/api/tiller-deploy/v1/namespaces/miguel/releases'
{
  "data": [
    {
      "releaseName": "api-d16636",
      "version": "0.1.0",
      "namespace": "miguel"
    },
    {
      "releaseName": "awesome-hyena",
      "version": "0.1.0",
      "namespace": "miguel"
    },
    {
      "releaseName": "crazy-ladybird",
      "version": "1.0",
      "namespace": "miguel",
      "icon": "https://engineering.bitnami.com/images/projects/bitnami-logo.png"
    }
  ]
}

# as you can see if we retrieve only the first 3 elements from helm list

# Only showing the first 
helm list -a --namespace miguel | head -4
NAME                            REVISION        UPDATED                         STATUS          CHART                           NAMESPACE
api-d16636                      1               Mon Jun 19 16:11:04 2017        DELETED         artifacts-0.1.0                 miguel   
awesome-hyena                   1               Mon Jul 17 13:26:40 2017        DELETED         toolchain-web-0.1.0             miguel   
crazy-ladybird                  1               Thu Jul 19 10:36:55 2018        DELETED         fabian-jasper-test-1.0          miguel   

This has a set of consequences once the tiller instance reaches the 512 limit.

  • We only show the charts that are withing that 512 window, regardless of if we are asking for a namespace or not. We should double check the get release function since there must be a way to get a release information without relying on listing all. Actually the helm list --namespace foo seems to work as expected but not our listing.
  • Any new deployments will be shown as not found even though the deployment is successful.

selection_615

I think that the scenario in which a cluster will contain more than 512 charts is not that likely but there are some low hanging fruit that we could fix.

If possible:

  • Re-implement listReleases(namespace) to not to rely on listing all elements in the namespace. helm list does it properly so there might be a way.
  • Re-implement get method to not to rely on the global list.
  • We might also want to increase the page size, helm CLI has a max option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug An issue that reports a defect in an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants