Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve repository selection, based on prefixes in config and full image name #547

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vsychov
Copy link
Contributor

@vsychov vsychov commented Mar 28, 2023

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-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

Merging #547 (7d33223) into master (49825ec) will increase coverage by 0.20%.
The diff coverage is 100.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%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Viacheslav Sychov <[email protected]>
@vsychov
Copy link
Contributor Author

vsychov commented Mar 29, 2023

Also in this PR I fixed pipeline (linter didn't works), @jannfis can you review pls?

@jannfis
Copy link
Contributor

jannfis commented Mar 31, 2023

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.

@vsychov
Copy link
Contributor Author

vsychov commented Jun 3, 2023

Hello @jannfis, is it ok to be merged?

@vsychov
Copy link
Contributor Author

vsychov commented Jul 30, 2023

Hello @jannfis , any updates on that?

@vsychov
Copy link
Contributor Author

vsychov commented Dec 18, 2023

Hi guys, can it be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants