Repos API/Helm - Support global private repos #5129
Labels
component/apis-server
Issue related to kubeapps api-server
component/apprepository
Issue related to kubeapps apprepository
kind/bug
An issue that reports a defect in an existing feature
Milestone
Summary
We aren't copying the namespace repos' secrets to the global namespace in the new implementation, as opposed to the former implementation.
Description
I've been working on polishing up the UI leftovers but, when I finished fixing the e2e tests, I noticed they weren't working with the new API.
After some debugging time, I noticed the error thrown by the job (asset-syncer) is sth like: Error: secret
default-apprepo-my-repo-88078
not foundNote that the secrets' name for namespace repos are like
apprepo-%s
. However, there is another function that adds the namespace as a prefix, like%s-apprepo-%s
This function is referenced here... pointing out an actual issue (that we, maybe mistakenly, closed).
To the best of my knowledge, it seems the asset-syncer is spinning up the sync jobs in the global namespace and therefore it is requiring every namespace repo's secret to be copied to that location. Otherwise, private repos won't sync.
So, if my assumptions are right, we could either:
Given the current bandwidth and priorities, I'd simply go with 1) and reopen #1647.
Acceptance criteria
Additional context
As @absoludity commented, we could give cluster-wide access to read secrets to the controller. Although it's not great that our controller would have that access, I think it's the most sensible option right now to support private repos while they're indexed by the controller explicitly. That's also an option for us, and would be better than replicating the ugly copying of the secret.
Perhaps that can even be refined these days so that our controller only has access to the specific secret object that it needs. Or we could only enable that RBAC if support for private repos is enabled or something so that it's not there by default
The text was updated successfully, but these errors were encountered: