gefyrahq / gefyra

Blazingly-fast :rocket:, rock-solid, local application development :arrow_right: with Kubernetes.
https://gefyra.dev
Apache License 2.0
692 stars 28 forks source link

Allow pulling docker image from a private docker registry #63

Closed netrounds-guillaume closed 2 years ago

netrounds-guillaume commented 2 years ago

We are running dev machines without access to the internet and gefyra up gets stuck pulling the quay.io/gefyra/operator:latest.

In general for pulling docker images, we have an artifactory instance in which we set up a cache of the quay.io registry. So, we are able to pull the gefyra/operator:latest image via <artifactory-url>/quay.io-cache/gefyra/operator:latest.

The question is, can adding support for pulling the docker images from a private registry other than quay.io be considered?

Schille commented 2 years ago

Hi @netrounds-guillaume this is actually a not too complex matter, as those images can be made configurable quite easily. I am planning to have the images for Operator and others to match Gefyra's CLI version in one of the next releases anyway (instead of using the "latest" tag).

How would you imagine the command then? Having something like this:

gefyra up --operator <artifactory-url>/quay.io-cache/gefyra/operator:0.6.16 --stowaway <artifactory-url>/quay.io-cache/gefyra/stowaway:0.6.16 --carrier <artifactory-url>/quay.io-cache/gefyra/carrier:0.6.16

(which is rather verbose) or better yet:

gefyra up --registry <artifactory-url>/quay.io-cache/gefyra

(gefyra constructs all required component images from that registry base)?

Let me know what you think.

Have you already tried Gefyra in an environment which is able to pull public repo images? With a local Kubernetes cluster, e.g. with k3d?

netrounds-guillaume commented 2 years ago

Hi!

Both proposals would work great for us. We would probably use the short version:

gefyra up --registry <artifactory-url>/quay.io-cache/gefyra

but I guess if you want users to be able to specify each image separately as well then both solutions could be implemented.

Have you already tried Gefyra in an environment which is able to pull public repo images?

No I have not but perhaps I can figure something out in the meantime 🤔

Schille commented 2 years ago

Hi @netrounds-guillaume it is with great pleasure to inform you, that Gefyra's CLI from version 0.7.2 on provides the --registry argument. :smile:

Have a look at the CLI reference for more information about gefyra up: https://gefyra.dev/reference/cli/#up

As far as I understood your setup, you will be required to also specify the --endpoint argument with the IP and port for your k3s cluster (which must point to a data plane node, not the API server). If there is no port mapping (let's say in a firewall), it is for Wireguard's underlying VPN connection. This is not yet well documented to be honest.

Let us know if that works for you.

Schille commented 2 years ago

Hi @netrounds-guillaume I just wanted to follow up on this one. Is it now working for you? If yes, please close this issue.

netrounds-guillaume commented 2 years ago

Hey!

Unfortunately we have not tested the feature yet, priorities have shifted a bit... 🙁

We will need some more time to give you some feedback on this.

Schille commented 2 years ago

Hi @netrounds-guillaume No worries. I will close this issue in the meantime.

Please let us know if you need something else.