Giter VIP home page Giter VIP logo

Comments (4)

bparees avatar bparees commented on July 19, 2024

When this is fixed, we should un-revert openshift/openshift-ansible#6913

from image-registry.

legionus avatar legionus commented on July 19, 2024
$ oc cluster up --version='latest'
$ oc version
oc v3.9.0-alpha.3+9ab7a71-232-dirty
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
openshift v3.9.0-alpha.3+9ab7a71-232
kubernetes v1.9.1+a0ce1bc657

$ oc login -u system:admin

$ oc rsh dc/docker-registry cat /proc/1/environ |tr '\0' '\n' |egrep '(DOCKER_REGISTRY_SERVICE_HOST|DOCKER_REGISTRY_SERVICE_POST|DOCKER_REGISTRY_URL|REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_DOCKERREGISTRYURL|OPENSHIFT_DEFAULT_REGISTRY|REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_DOCKERREGISTRYURL)'
DOCKER_REGISTRY_SERVICE_HOST=172.30.1.1

I do not know how you created the cluster, but in the cluster that is created by oc cluster up, a variable DOCKER_REGISTRY_SERVICE_HOST is set.

$ oc env -n default dc/docker-registry REGISTRY_OPENSHIFT_SERVER_ADDR=foobar

$ oc rsh dc/docker-registry cat /proc/1/environ |tr '\0' '\n' |egrep '(DOCKER_REGISTRY_SERVICE_HOST|DOCKER_REGISTRY_SERVICE_POST|DOCKER_REGISTRY_URL|REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_DOCKERREGISTRYURL|OPENSHIFT_DEFAULT_REGISTRY|REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_DOCKERREGISTRYURL|REGISTRY_OPENSHIFT_SERVER_ADDR)'
REGISTRY_OPENSHIFT_SERVER_ADDR=foobar
DOCKER_REGISTRY_SERVICE_HOST=172.30.1.1

As you can see the DOCKER_REGISTRY_SERVICE_HOST variable is still set and it has a higher priority. To remove it you have to unset it explicitly:

$ oc env -n default dc/docker-registry DOCKER_REGISTRY_SERVICE_HOST=''

I have test for env variables: https://github.com/openshift/image-registry/blob/master/pkg/dockerregistry/server/configuration/configuration_test.go#L565
In it, you can see the priorities of the environment variables.

We can raise the priority of the REGISTRY_OPENSHIFT_SERVER_ADDR variable, but in that case we'll probably break old configurations that use old variables.

So this is not a bug, but the expected behavior.

from image-registry.

legionus avatar legionus commented on July 19, 2024

@bparees To be sure, please show the dockerregistry environment variables.

from image-registry.

dmage avatar dmage commented on July 19, 2024

@legionus DOCKER_REGISTRY_SERVICE_HOST is always set by Kubernetes.

from image-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.