WIP [DO_NOT_MERGE]: Read registry configuration from Docker daemon in new-app#10637
WIP [DO_NOT_MERGE]: Read registry configuration from Docker daemon in new-app#10637mfojtik wants to merge 1 commit intoopenshift:masterfrom
Conversation
9eea00e to
296a449
Compare
|
@mfojtik My concern would be that we're assuming that your local Docker is configured with the registries that you'd want to use in your cluster. It's highly likely that it is... just don't have a feel for a probability. |
|
@csrwng we still search the cluster images first (if I understand that code right) and do this in a fallback. In that case, instead of just defaulting to "docker.io" which is hardcoded in importer, we at least try more registries. If there is a match, the IS created will point to that exact registry, so in case that registry does not exists in the cluster you will notice that, but we won't prevent your from creating the application because our resolution does not see registries other than "docker.io" when you don't specify the full path (which I think should be the "best practice" ;-) |
pkg/generate/app/cmd/newapp.go
Outdated
| Namespace: OriginNamespace, | ||
| } | ||
|
|
||
| // Attempt to discovert default registries |
| } | ||
| } | ||
| extendedTerms = append(extendedTerms, terms...) | ||
| glog.V(5).Infof("fallbacking to generic search (%q, %#+v)", precise, extendedTerms) |
There was a problem hiding this comment.
s/fallbacking/falling back/
296a449 to
c25ee66
Compare
|
I find this highly unlikely. Also, the image importer doesn't have
access to the docker socket, so it cannot do this. If we aren't going
to do it on the server, doing it on the client doesn't help.
Why are we doing this again?
|
|
@smarterclayton https://bugzilla.redhat.com/show_bug.cgi?id=1369769 basically you have Dockerfile with |
|
First off - 90% of the systems out there will never have those aliases. Aliasing is a machine level decision, but should be a cluster level On Aug 25, 2016, at 10:15 AM, Michal Fojtik notifications@github.com @smarterclayton https://github.com/smarterclayton basically you have Dockerfile with FROM rhel7 and you run new-app locally — |
|
Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again |
|
Based on previous comment, I'm closing this as this won't get fixed. |
This patch will use the engine-api client to get list of Docker registries (
ADD_REGISTRY) configured for a Docker daemon and use that list to extended the search for the Docker image during thenew-app.In other words, if you have Dockerfile in your application source which has
FROM rhel7and you have Docker that runs with--add-registry registry.access.redhat.comoption, theoc new-appwill include that registry when searching for image match.@smarterclayton I think we should do something similar in image importer (we default to
docker.ioand not respecting the Docker configuration).@csrwng you might have opinions about this.
Also fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1369769