helm / helm/chartmuseum

Unable to refresh tenant index and get new chart versions

Open
#794 2 comments 0 reactions 1 assignee Claimed by @nerdeveloper View on GitHub
Dominant language
Go
Stars
3.8k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

Hello,
I'm using multitenancy and alibaba OSS bucket as backend. My CM is not able to refresh the index of a tenant if a chart name's prefix at the root level is the same as the name of the tenant.

For example, in the bucket i have
```
/abc-def-1.1.1.tgz
...
/abc-def-1.1.24.tgz
/abc/xyz-1.1.1.tgz
```
If I uploaded a new chart
```
/abc/xyz-1.1.2.tgz
```
then my helm client can't see this new version because CM keeps failing to refresh `abc` index.
```
{"L":"INFO","T":"2024-12-02T07:51:12.661Z","M":"Rebuilding index for tenant","repo":"abc"}
...
{"L":"DEBUG","T":"2024-12-02T07:51:12.661Z","M":"Entry found in cache store","repo":"abc"}
{"L":"DEBUG","T":"2024-12-02T07:51:12.661Z","M":"Fetching chart list from storage","repo":"abc"}
{"L":"DEBUG","T":"2024-12-02T07:51:12.676Z","M":"Change detected between cache and storage","repo":"abc"}
{"L":"DEBUG","T":"2024-12-02T07:51:12.676Z","M":"Regenerating index.yaml","repo":"abc"}
{"L":"DEBUG","T":"2024-12-02T07:51:12.676Z","M":"Loading charts packages from storage (this could take awhile)","repo":"abc","total":24}
{"L":"ERROR","T":"2024-12-02T07:51:12.680Z","M":"oss: service returned error: StatusCode=404, ErrorCode=NoSuchKey, ErrorMessage=\"The specified key does not exist.\", RequestId=674D66F04E22F83137933220","repo":"abc"}
```

From my istio proxy, I can see it's trying to get charts `abc-def` inside the `abc` tenant.
And i think it's because of this line https://github.com/helm/chartmuseum/blob/8795e9930ad1f88f8c20426368327b0e500adcda/pkg/chartmuseum/server/multitenant/cache.go#L201

Is there suppose to be a `/` at the end? Not sure how it would affect the other backend suppliers

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.