fix: use registry for `helm registry ..` commands
For OCI Helm repositories that require credentials, helm registry login and helm registry logout needs to use the registry host, rather than the full repository url. The issue is that if an app has a repoURL that contains more than a host, e.g registry-1.docker.io/bitnamicharts, the full repo url gets passed to helm registry .. rather than just the hostname.
Using a repository credential with just the host doesn't help either, since that doesn't get matched to the repoURL, hence the creds don't get passed along to the repo server.
This ~notably affects~ seems to affect only Dockerhub (I haven't yet tried Harbor, but Quay seems to work without issue even with the full repoURL); any chart that's hosted privately there will have this issue. Fixes #22831.
Checklist:
- [x] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
- [x] The title of the PR states what changed and the related issues number (used for the release note).
- [ ] The title of the PR conforms to the Toolchain Guide
- [x] I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
- [ ] I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
- [ ] Does this PR require documentation updates?
- [ ] I've updated documentation as required by this PR.
- [x] I have signed off all my commits as required by DCO
- [x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
- [ ] My build is green (troubleshooting builds).
- [ ] My new feature complies with the feature status guidelines.
- [x] I have added a brief description of why this PR is necessary and/or what this PR solves.
- [ ] Optional. My organization is added to USERS.md.
- [ ] Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).
:x: Preview Environment undeployed from Bunnyshell
Available commands (reply to this comment):
- :rocket:
/bns:deployto deploy the environment
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:warning: Please upload report for BASE (master@146a779). Learn more about missing BASE report.
:warning: Report is 420 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #23142 +/- ##
=========================================
Coverage ? 60.32%
=========================================
Files ? 347
Lines ? 59635
Branches ? 0
=========================================
Hits ? 35974
Misses ? 20793
Partials ? 2868
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@blakepettersson is this still pending approval?
@agaudreault I forgot about this PR, I believe I've addressed your concerns though 😄
Hello ! When do you think this pull request will be merged ? I'm looking forward theses changes ! :smiley: Can we provide some help to advance ?
@agaudreault @blakepettersson we are also waiting for this. We have several cases that are blocked because we can't properly authenticate with dockerhub...