argocd-image-updater
argocd-image-updater copied to clipboard
Improve repository selection, based on prefixes in config and full image name
Hello everyone,
This code solves a problem that occurs with DigitalOcean repositories when you have multiple repositories in different projects with different credentials.
For example:
registries:
- api_url: https://registry.digitalocean.com
credentials: pullsecret:infra/registry-project1
name: Project 1
ping: false
prefix: registry.digitalocean.com/project1
- api_url: https://registry.digitalocean.com
credentials: pullsecret:infra/registry-project2
name: Project 2
ping: false
prefix: registry.digitalocean.com/project2
Previously, image-updater ignored this configuration and only used "https://registry.digitalocean.com" because it could not find an exact repository match. This PR fixes this problem so that the above configuration will work.
Codecov Report
Merging #547 (7d33223) into master (49825ec) will increase coverage by
0.20%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #547 +/- ##
==========================================
+ Coverage 65.76% 65.96% +0.20%
==========================================
Files 21 21
Lines 2039 2051 +12
==========================================
+ Hits 1341 1353 +12
Misses 569 569
Partials 129 129
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/argocd/update.go | 69.79% <100.00%> (ø) |
|
| pkg/registry/endpoints.go | 75.53% <100.00%> (+2.31%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Also in this PR I fixed pipeline (linter didn't works), @jannfis can you review pls?
Thanks @vsychov - this change is reasonable to me, and I'd like it to go in! I'll try to carve out some time for review really soon.
Hello @jannfis, is it ok to be merged?
Hello @jannfis , any updates on that?
Hi guys, can it be merged?