Repository navigation
ArgoCD repo-server serves stale Helm chart when same version is re-uploaded to repository #29194
Replies: 3 comments 4 replies
|
The setting you tuned governs a different cache from the one holding you back, which is why dropping it to one minute changed nothing. There are two layers.
func (c *nativeHelmChart) getCachedChartPath(chart string, version string) (string, error) {
keyData, err := json.Marshal(map[string]string{"url": c.repoURL, "chart": chart, "version": version})
...
}No digest, no content hash. Worth checking your version against this, because it changes what you can do:
So a TTL on the chart cache exists on HelmChartCacheExpiration: repoCacheExpiration,which means once that ships, your existing Until then: Bump the chart version. This is the real fix, not a workaround. Helm's ecosystem treats To clear what's already cached, restart the repo-server pods. The cache lives under If you're stuck with same-version overwrites for reasons outside your control, that's worth stating explicitly in a feature request, because the |
|
@MLuc24 has the mechanism right, and one of your own verification steps is what's hiding it from you. You checked kubectl exec -n argocd deploy/argocd-repo-server -- ls -la /tmp/_argocd-repo/The tarball is one of those UUIDs, with no chart name and no version in the path. The key that maps to it is identity only ( keyData, err := json.Marshal(map[string]string{"url": c.repoURL, "chart": chart, "version": version})
// ...
return c.chartCachePaths.GetPath(string(keyData))and if val, ok := p.paths[key]; ok {
return val, nil
}
uniqueId, err := uuid.NewRandom()
// ...
repoPath := filepath.Join(p.root, uniqueId.String())
p.paths[key] = repoPathNo digest anywhere. The cheap unblock is a Hard Refresh, not a pod restart. That cache does have an invalidator: That also fixes the test you'd want. A normal refresh will keep serving A repo-server restart works too, for a different reason worth knowing: the key-to-path map lives on the The durable fix is to stop republishing a version. There's no digest in that key by design, and Helm treats a chart version as immutable content. Bump to 1.0.1, or point |
This is Argo CD's manifest cacheThe repo-server caches generated manifests keyed on the source revision (git commit / chart version). If you re-upload the same version to the Helm repo, the source revision doesn't change, so Argo CD keeps serving the cached manifests until the cache entry is invalidated. Ways to force it to pick up the new chart
For charts sourced from a git repo, add the If you re-upload same-version charts regularly, bump the patch version per upload — same-version re-upload is exactly the case the cache is designed to avoid re-processing. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
When a Helm chart is re-uploaded to a Helm repository with the same version but different content, ArgoCD's repo-server continues to render manifests from the previously cached chart indefinitely. The Helm repository correctly serves the updated chart, but ArgoCD does not pick up the change.
Environment
Scenario
Verification
What we tried
Repo-server logs timeline (UTC)
T+0m00s manifest cache miss ← app created, first render uses old chartT+0m03s manifest cache hit ← cached old manifests servedT+4m40s manifest cache miss ← hard-refresh triggered programmaticallyT+4m43s manifest cache hit ← re-cached, still old chart contentT+6m05s manifest cache miss ← 1m TTL expiry, still old chartT+11m37s manifest cache miss ← new chart eventually picked upQuestions
All reactions