-
Notifications
You must be signed in to change notification settings - Fork 25
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
how to display multiple repositories #219
Comments
hmm not aware of. But this is a good use case. |
I intend to support this scenario and have written a technical design document. Looking forward to anyone's feedback! 😁 Scene DescriptionConsider some business scenarios where a component may be associated with multiple harbor repositories, e.g:
To meet the above scenario, two things need to be supported:
Technical DesignConfiguration
Note: Example: harbor:
baseUrl: https://harbor.yourdomain.com
username: ""
password: ""
instances:
- host: harbor.yourdomain.com
username: ""
password: ""
apiBaseUrl: https://harbor.yourdomain.com Configuration CompatibilityMulti-instance support will be compatible with existing configurations and the existed configurations will be automatically converted to multi-instance configurations. The conversion rules are as follows:
Original configuration: harbor:
baseUrl: https://harbor.yourdomain.com
username: "aaa"
password: "bbb" Configuration after conversion: harbor:
instances:
- host: harbor.yourdomain.com
username: "aaa"
password: "bbb"
baseUrl: https://harbor.yourdomain.com AnnotationReuse the goharbor.io/repository-slug annotation to associate harbor projects, with the difference being that it supports writing a full repository address, e.g: # before
goharbor.io/repository-slug: my-project/my-repo
# after
goharbor.io/repository-slug: harbor.yourdomain.com/my-project/my-repo The domain name part ( Configuration CompatibilityIf no host is specified in the entity annotation, then the host part of harbor.baseUrl will be used as the default, and if harbor.baseUrl is also not configured, then the first instance defined in Entity supports association of multiple repositoriesIf an entity is associated with multiple harbor items, they can be separated by commas, e.g:
goharbor.io/repository-slug: my-project/my-repo, my-project/my-repo2
UI DisplayRepository WidgetIf the entity is associated with more than one harbor repository, a dropdown box is added to the top right corner of the widget. If the entity is associated with only one harbor repository, then the dropdown box will not be displayed. Repository TableIf the entity is associated with more than one harbor repository, multiple tables will be displayed, each corresponding to one harbor repository. |
makes sense, |
Hi, I would start working on that if that's fine? 🙂 About the UI mockup - I think it's pretty well described in the "UI Display" section above but I could of course create additional mockups if you want. |
If a component builds multiple images and pushes them to different repositories, such as
project/aaa
andproject/bbb
, is there a way to display the information of these two repositories on the entity page at the same time?The text was updated successfully, but these errors were encountered: