KatharaFramework / Kathara

A lightweight container-based network emulation system.
https://www.kathara.org/
GNU General Public License v3.0
455 stars 63 forks source link

Add support for private registry on Megalos #282

Closed GioBar00 closed 1 month ago

GioBar00 commented 7 months ago

- What I did

- How I did it

- How to verify it Create a private registry and get the docker config. Example of the file structure:

{
    "auths": {
        "https://index.docker.io/v1/": {
            "auth": "c3R...zE2"
        }
    }
}

Compute the base64 encoding of the docker config and add it to Kathara settings. Deploy a lab with kathara lstart or a machine with kathara vstart with an image available on the private registry.

- Description for the changelog

Added support for private registries on Megalos

Resolves #283.

GioBar00 commented 7 months ago

- Why It allows to use images that someone might not want to give public access to. It is necessary to add this feature directly to Kathará since there is no straight forward way to do it separately. Kubernetes secrets are namespaced so one would need to create the Kubernetes secret after the namespace is created, but before the pods are deployed. This is not possible when deploying a lab in Kathará since the machines are created right after the namespace is.

GioBar00 commented 5 months ago

I modified the code with the suggestions above.

Skazza94 commented 5 months ago

Hi @GioBar00, thank you very much!

I will check the changes tomorrow and if everything is ok I will merge the PR in the develop branch for the next release.

Skazza94 commented 1 month ago

Hey @GioBar00, do you plan to add some tests for the new feature?

Otherwise, we could merge the PR and write them by ourselves to speed up the feature addition! 😄

Thanks, Mariano.

GioBar00 commented 1 month ago

Sorry, currently I do not have time to look into it myself. Proceed with the merge. Sorry again and thanks 👍