-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support using multiple images sources in our CLI #142
Conversation
src/aosm/azext_aosm/configuration_models/onboarding_cnf_input_config.py
Outdated
Show resolved
Hide resolved
@@ -34,15 +34,10 @@ def write(self): | |||
"""Write the definition element to disk.""" | |||
self.path.mkdir(exist_ok=True) | |||
artifacts_list = [] | |||
# TODO: Handle converting path to string that doesn't couple this code to the artifact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this all fixed? Amazing!!! 😃
Do you know how well it's been tested / needs to be tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this for the RemoteACRArtifact class which is the one that gets created for CNF helm images. I have not tested with other artifacts so would be great if someone tests it, but I don't think it should cause any problems given it works for mine just fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the next step is here. Do you think your live testing will cover this sufficiently?
src/aosm/azext_aosm/definition_folder/reader/artifact_definition.py
Outdated
Show resolved
Hide resolved
LGTM |
This PR is delivering the feature of allowing multiple image sources in our CLI and allow these sources to be registries other than Azure Container Registries (for example docker registries). Here is a link to the story: [Turtle 2Wk13 (Mar 10 - Mar 23) Taskboard - Boards (azure.com)](https://dev.azure.com/msazuredev/AzureForOperators/_sprints/taskboard/Turtle/AzureForOperators/Germanium/CY24Q1/2Wk/2Wk13%20(Mar%2010%20-%20Mar%2023)?workitem=1096825)
Changes
To achieve this, I have implemented the following:
registry.py
file which contains all logic related to registriesartifact.py
file and moved it to the new registry classesonboarding_cnf_handler
. This will create individual registry objects based on the input “image_sources” listdocker
interface. This is hard to do without asking the users for credentials. Because of this, I do not check for all images in the docker registries. Instead, if an image is not in an ACR, we search the docker registries for that specific image. This means that the interfaces between two registry classes are different. Is this ok? Doing the same for ACRs would make the process much slower.find_registry_for_image
on the registry_handler class.Other things:
helm template
with the assumption that the string after the final slash is the actual image name while everything before that is just namespace? Is that true? When searching for images in the Registries, I add the namespace based on the user input in the input config.artifacts.json
fileTesting: