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

public registry proxy not getting the latest Chart versions anymore? again? #7

Open
ppellmont-css opened this issue Nov 14, 2023 · 12 comments

Comments

@ppellmont-css
Copy link

Hi there

There seems to be the same issue as in #3.

I tried to get the latest chart for camunda-platform.
The tags list (https://chartproxy.container-registry.com/v2/helm.camunda.io/camunda-platform/tags/list) does not contain the tag 8.3.1, despite the index.yaml at the referenced repository has.

I first thought it might be an issue with the remoteside (index.yaml or something similar), but this seems to be okay. I can directly pull from the original site AND I setup chartproxy in a docker container and tried to pull from there: this works too. So my assumption is that either the public chartproxy registry has not been updated or there is another not yet known issue with the index update,.

I'd be very happy if you could have a look!
Thanks, Pascal

@Vad1mo
Copy link
Contributor

Vad1mo commented Nov 14, 2023

you are right, we need to release the latest version that contains the fix.

@Vad1mo
Copy link
Contributor

Vad1mo commented Nov 14, 2023

I'll reset the current cache, so it should work again.

@ppellmont-css
Copy link
Author

Thanks a lot, this helped 👍

@elias5000
Copy link

Today I noticed this issue in my installation. Restarting the proxy "fixed" the issue for now. How can I prevent this from happening again? I don't want to restart the proxy every night.

@Vad1mo
Copy link
Contributor

Vad1mo commented Feb 8, 2024

The new version of the images fixes the issue. I need to updat the helm chart

@verdel
Copy link

verdel commented Feb 20, 2024

@Vad1mo, could you please tell me if the issue with version "lag" has been fixed in the public proxy?

Because for chart museum repository https://argoproj.github.io/argo-helm the tags are lagging if I use public proxy https://chartproxy.container-registry.com/argoproj.github.io/argo-helm/argo-cd

@ChristianBieri1995
Copy link

Hi guys

Whilst pulling the latest Grafana Helm Chart (7.3.7) I ran into the same error. When do you deploy the fix? Could you please reset the current cache as this may solve the issue?

@ChristianBieri1995
Copy link

Hi guys

Whilst pulling the latest Grafana Helm Chart (7.3.7) I ran into the same error. When do you deploy the fix? Could you please reset the current cache as this may solve the issue?

Any Updates on that?

@haiwu
Copy link

haiwu commented May 24, 2024

I just hit the same issue. I retried the pull replication many times before, trying to see if I could get latest cilium chart 1.15.5 synced over, but it kept missing this latest chart. It seems the sync process would need to list all available charts first, and it is in this phase that it could only see cilium chart up to 1.15.4.

After rollout restarting chartproxy deployment, and resyncing it, it works.

So this is still a bug.

@verdel
Copy link

verdel commented May 24, 2024

@haiwu

This problem arises because in the docker image version used in the chart (latest, which is a3a35bc), the proxy code for caching repository index responses uses an in-memory cache without specifying the record's time-to-live.

Because of this, the data about helm chart versions will only update when the in-memory cache overflows and entries start being "evicted"

Therefore, the data about available chart versions is updated after restarting helm-charts-oci-proxy. The in-memory cache is recreated upon restart and is populated with up-to-date data on the first request to the repository.

The docker image used in the chart is built approximately from this commit.

The code shows that entries are placed in the cache without specifying a time-to-live (here and here).

You need to use one of the docker images that are now regularly built from the main branch. The most up-to-date tag version at the moment is staging-202404291447.

In the current version of the code, the cache entry time-to-live is set and regulated by environment variable values (here and here).

You will need to set the cache entry time-to-live through the environment variables:

  • INDEX_CACHE_TTL: for how long we store chart index file content, the default value is 14400 seconds (4h)
  • INDEX_ERROR_CACHE_TTL: for how long we do not try to obtain index files again if it's failed for some reason. The default value is 30 seconds

You can get the full list of available docker image tags using the imgpkg utility:

> imgpkg tag list -i 8gears.container-registry.com/library/helm-charts-oci-proxy
Tags

Name
0.1.8
1.0.0
1.1.0
1.2.2
1.2.3
6ba3bef
a3a35bc
latest
staging-202402231744
staging-202402231748
staging-202402231751
staging-202402251539
staging-202402251550
staging-202402251628
staging-202402251632
staging-202402251634
staging-202402251952
staging-202404040829
staging-202404261319
staging-202404291447

20 tags

Succeeded

@haiwu
Copy link

haiwu commented May 24, 2024

@verdel : Thanks! I am currently using helm-charts-oci-proxy tag version '1.2.2', would this chart version also have the same issue as latest/a3a35bc?

@verdel
Copy link

verdel commented May 24, 2024

@haiwu, In all versions of the helm chart, including the one currently in the main branch, the tag of the used docker image is latest.

The tag latest corresponds to version a3a35bc at the moment:

> docker inspect --format='{{index .RepoDigests 0}}' 8gears.container-registry.com/library/helm-charts-oci-proxy:latest
8gears.container-registry.com/library/helm-charts-oci-proxy@sha256:5b20d3cb79a5671dafe0b7e4ec57b4c7ef371a4722e4ae7b4e0bec0d6d6a8c85

> docker inspect --format='{{index .RepoDigests 0}}' 8gears.container-registry.com/library/helm-charts-oci-proxy:a3a35bc
8gears.container-registry.com/library/helm-charts-oci-proxy@sha256:5b20d3cb79a5671dafe0b7e4ec57b4c7ef371a4722e4ae7b4e0bec0d6d6a8c85

You will need to change the tag through the chart's values (image.tag).

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

No branches or pull requests

6 participants