On Mon, Sep 16, 2019 at 8:17 AM Just Marvin <
[email protected]> wrote:

> Hi,
>
>     I'm working with code-ready-containers, and I can see that there are
> image streams that I need in the openshift namespace (for example, the
> jboss eap 7.2 image). The images themselves are not local - but on
> registry.redhat.io. My problem is two fold: (1) how do I configure the
> cluster such that I can simply use these imagestreams from a new-app
> command (2) How do I set up the cluster so that any needed authentication
> is pre-defined in the cluster.
>
> For (1):
>
> zaphod@oc6010654212 ~]$ oc describe is jboss-eap72-openshift -n openshift
> Name: jboss-eap72-openshift
> Namespace: openshift
> Created: 3 weeks ago
> Labels: samples.operator.openshift.io/managed=true
> Annotations: openshift.io/display-name=Red Hat JBoss EAP 7.2
> openshift.io/image.dockerRepositoryCheck=2019-08-23T17:59:24Z
> openshift.io/provider-display-name=Red Hat, Inc.
> samples.operator.openshift.io/version=4.1.11
> version=1.0
> Image Repository:
> default-route-openshift-image-registry.apps-crc.testing/openshift/jboss-eap72-openshift
> Image Lookup: local=false
> Unique Images: 2
> Tags: 2
>
> latest
>   tagged from registry.redhat.io/jboss-eap-7/eap72-openshift:latest
>     prefer registry pullthrough when referencing this tag
>
>     The problem here is that I can't work out the syntax of the new-app
> command that can refer to an imagestream in a different namespace
> (openshift). How does one do this?
>

oc new-app jboss-eap72-openshift~somerepo

If you use that syntax, new-app will look for an imagestream named
"jboss-eap72-openshift", it will look in both your current namespace, and
the openshift namespace.  (It will also look for docker images w/ that
name).  So that should be sufficient.

if you want to be more specific you should be able to use a syntax like:

oc new-app somerepo --image-stream openshift/jboss-eap72-openshift

You can experiment w/ this behavior with oc new-app --search
jboss-eap72-openshift to see what it is finding/matching.

Note that if jboss-eap72-openshift exists, but has not imported
successfully (such as because the openshift namespace does not have valid
credentials for registry.redhat.io) then new-app is not going to attempt to
use that imagestream.




>
> For (2):
> I think I need the equivalent of this page, to set things up:
> https://docs.openshift.com/container-platform/3.11/install_config/configuring_red_hat_registry.html
>  .
> However, I can't find the equivalent in the 4.1 docs. I suspect the move to
> a registry operator means that the procedure is completely different.
>

https://docs.openshift.com/container-platform/4.1/registry/registry-options.html#registry-authentication-enabled-registry-overview_registry-options




>
> In addition, I'm trying to use podman. I can login to registry.redhat.io
> no problem, but I don't know where it stores the token that I'll need to
> configure auth. Or atleast, I think thats what I need. Not sure.....do I
> actually have to but the userid + password into the cluster?
>

it should be updating/using your ~/.docker/config.json file, just like
docker does.  And that file is what you need to turn into your
credential/secret that you place in the same namespace as the imagestreams
you want to import.

That said, as Fernando has just replied, you should not need to setup any
creds to use CRC.





>
> Regards,
> Marvin
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>


-- 
Ben Parees | OpenShift
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to