I think your DC needs to be configured to pull from the imagestream
...
      spec:
        containers:
        - env:
          image: 
"docker-registry.default.svc:5000/myproject/myapplication:latest"
          imagePullPolicy: Always
          name: myapplication
          ports:
          - containerPort: 8080
...

Otherwise you don’t need an imagestream.

You can configure the image stream to do pull-through:
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  generation: 1
  name: myapplication
spec:
  lookupPolicy:
    local: false
  tags:
  - annotations: null
    from:
      kind: DockerImage
      name: myregistry.mydomain.com/myproject/myapplication:latest
    generation: 1
    importPolicy:
      scheduled: true
    name: latest
    referencePolicy:
      type: Local

The reference policy portion is the part that enforces a local copy of the 
remote image, and keeps you from needing to rely on a less reliable external 
docker registry.


From: <users-boun...@lists.openshift.redhat.com> on behalf of Marcello Lorenzi 
<cell...@gmail.com>
Date: Monday, April 12, 2021 at 2:05 PM
To: users <users@lists.openshift.redhat.com>
Subject: [EXTERNAL] OKD 3.11 pull from external registry and image stream

WARNING: This email originated outside of the Availity email system.
DO NOT CLICK links or open attachments unless you recognize the sender and know 
the content is safe.
________________________________
Hi All,
We are checking our helm configuration to deploy the images taken from an 
external registry.  We put into the image stream config and deployment config 
the link to external registry but the image has been deployed without fhe image 
stream update.

Is it correct this behavior?

Thanks,
Marcello

----------------------------------------------------------------------
The information contained in this e-mail may be privileged and confidential 
under applicable law. It is intended solely for the use of the person or firm 
named above. If the reader of this e-mail is not the intended recipient, please 
notify us immediately by returning the e-mail to the originating e-mail 
address. Availity, LLC is not responsible for errors or omissions in this 
e-mail message. Any personal comments made in this e-mail do not reflect the 
views of Availity, LLC.
_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to