Closed zalintyre closed 6 years ago
FYI, i posted this issue at kubernetes first and they think it's an OpenShift issue: https://github.com/kubernetes/kubernetes/issues/55003
oc set image-lookup
on an image stream called zookeeper
will make it so that an image stream tag for zookeeper:latest
will be loaded from the registry when accessed directly in a stateful set, daemonset, deployment, replica set, job, or cronjob.
@dsfranzi what Clayton suggested, lemme know if that fixes your problem.
@smarterclayton do we have docs about oc set image-lookup
?
oc set image-lookup zookeeper
didn't work, the result of oc set image-lookup
always stays the same:
$ oc set image-lookup
NAME LOCAL
solr false
spark false
spark-ui-proxy false
zeppelin false
zookeeper false
zoonavigator-api false
zoonavigator-web false
I also tried to delete the ImageStream and redeploy my template with this config (lookupPolicy: local), but still no luck:
# ImageStream
- apiVersion: v1
kind: ImageStream
metadata:
name: zookeeper
spec:
lookupPolicy:
local: true
tags:
- annotations: null
from:
kind: DockerImage
name: 'zookeeper:latest'
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ''
P.S.: @mfojtik I think you mentioned this piece of documentation: https://docs.openshift.com/container-platform/3.6/dev_guide/managing_images.html#using-is-with-k8s ?
set-image lookup
only works on 3.6 and above
So what can I use with 1.5? I don't consider adding the IP address of the internal registry to the image spec a permanent solution.
And the key question is: Why does it work for DeploymentConfigs but not for StatefulSets?
There is no solution for 1.5 for StatefulSets. We added this feature into 3.6 to address the use case, before that it was not possible.
DeploymentConfigs were built with image substitution in mind. There is a trigger field on the API spec that provides this behavior.
On Mon, Nov 6, 2017 at 10:38 AM, Franz Wimmer notifications@github.com wrote:
So what can I use with 1.5? I don't consider adding the IP address of the internal registry to the image spec a permanent solution.
And the key question is: Why does it work for DeploymentConfigs but not for StatefulSets?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/origin/issues/17157#issuecomment-342186545, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG_p4Y48cr1rMPIBwyGl3_GBsLNKowQks5szyf_gaJpZM4QQSWs .
So basically my only workaround - before I can upgrade to 3.6 - is to upload all my images to docker hub?
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
i ran into the same issue. was able to resolve from local registry by adding this annotation: *alpha.image.policy.openshift.io/resolve-names: ''** OC Documentaiton
I'm using Kubernetes 1.5 in OpenShift. I pushed all my customized docker images to OpenShift's internal registry. When using a DeploymentConfig, everything works fine, kubernetes pulls the right image.
When using a StatefulSet, Kubernetes won't find my docker image in the internal registry and instead pulls an image from docker hub.
My StatefulSet:
It would work when i put the internal registry URL in front of the image name like this:
image: 172.30.158.156:5000/<projectname>/zookeeper:latest
But when I'm working with multiple clusters, this isn't practical (and again, it works with DeploymentConfigs)
Version
Steps To Reproduce
Change a
DeploymentConfig
using an internal image to aStatefulSet
.Current Result
See description above.
Expected Result
I expected the same behavior as with DeploymentConfigs: That kubernetes would pull the image from the internal registry.