Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

Default registry as docker.io #730

Open arun-gupta opened 6 years ago

arun-gupta commented 6 years ago

The default registry should be configured as docker.io. This is the most common use case and should not require any extra configuration.

Identified during hacking with @michelleN at #KubeCon

bacongobbler commented 6 years ago

Hey! To provide a little background context, we opted to go for the default being unset for a couple reasons:

  1. The majority of early adopters hacking on apps with Draft all tend to use Minikube/Docker for Mac
  2. Minikube/DfM users wanted a way to opt out of pushing to a container registry as it was deemed unnecessary for their use case (see #102 and #432 for more context)

After hearing feedback from users, I actually disagree that the most common use case is using DockerHub with Draft. We heard that the setup required to interact with a public container registry was very tricky/clumsy to start out. Keeping in mind that we are trying to target new developers who have not yet tried out Docker/Kubernetes:

All in all the experience to use DockerHub for a new user was found to be quite clunky, especially for users new to the Docker ecosystem. If most users were hacking on Kubernetes apps using cloud infrastructure, then I'd see the value in this, but I'm fairly skeptical about that actually being the case for a FOSS dev tool aimed at developers new to the space.

Always happy to hear this sort of feedback, so please feel free to elaborate on your thoughts here :)

birdayz commented 6 years ago

I feel that defaulting to docker.io might even be dangerous to newcomers: he/she might "accidentially" push a public image (that's still the default for docker.io, right?), which might not be what he/she wants.

squillace commented 6 years ago

Important note : you can set the default registry in the toml file, and you can pull in custom toml files already, so an org can globally apply a standard.

But I still definitely understand the request...

bacongobbler commented 6 years ago

We could perhaps extend draft init through the --config flag as we do with plugins. I'll think through some ideas.

bacongobbler commented 6 years ago

Good point though @squillace. If a user overrides the app's draft.toml with a registry field then we'll use that regardless of what's shown in draft config list. I also understand the request as well, but from previous feedback we opted to go a different route. :)