container-registry / helm-charts-oci-proxy

The Helm Charts OCI Proxy, will proxy and transform Helm Chart into OCI images on the fly. Address any Helm Chart as OCI image.
GNU Affero General Public License v3.0
77 stars 5 forks source link

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

Open ppellmont-css opened 7 months ago

ppellmont-css commented 7 months ago

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 commented 7 months ago

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

Vad1mo commented 7 months ago

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

ppellmont-css commented 7 months ago

Thanks a lot, this helped 👍

elias5000 commented 4 months ago

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 commented 4 months ago

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

verdel commented 4 months ago

@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 commented 3 months ago

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 commented 3 months ago

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 commented 1 month ago

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 commented 1 month ago

@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:

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 commented 1 month ago

@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 commented 1 month ago

@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).