{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/9584","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/9584/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/9584/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/9584/events","html_url":"https://github.com/openshift/origin/issues/9584","id":162464636,"number":9584,"title":"accessing ImageStream from private repository with auth delegated to a different server requires creating two secrets instead of one","user":{"login":"jperville","id":834791,"avatar_url":"https://avatars.githubusercontent.com/u/834791?v=3","gravatar_id":"","url":"https://api.github.com/users/jperville","html_url":"https://github.com/jperville","followers_url":"https://api.github.com/users/jperville/followers","following_url":"https://api.github.com/users/jperville/following{/other_user}","gists_url":"https://api.github.com/users/jperville/gists{/gist_id}","starred_url":"https://api.github.com/users/jperville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jperville/subscriptions","organizations_url":"https://api.github.com/users/jperville/orgs","repos_url":"https://api.github.com/users/jperville/repos","events_url":"https://api.github.com/users/jperville/events{/privacy}","received_events_url":"https://api.github.com/users/jperville/received_events","type":"User","site_admin":false},"labels":[{"id":285030889,"url":"https://api.github.com/repos/openshift/origin/labels/component/image","name":"component/image","color":"0052cc","default":false},{"id":118251699,"url":"https://api.github.com/repos/openshift/origin/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":210151912,"url":"https://api.github.com/repos/openshift/origin/labels/priority/P2","name":"priority/P2","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false},"assignees":[{"login":"soltysh","id":576341,"avatar_url":"https://avatars.githubusercontent.com/u/576341?v=3","gravatar_id":"","url":"https://api.github.com/users/soltysh","html_url":"https://github.com/soltysh","followers_url":"https://api.github.com/users/soltysh/followers","following_url":"https://api.github.com/users/soltysh/following{/other_user}","gists_url":"https://api.github.com/users/soltysh/gists{/gist_id}","starred_url":"https://api.github.com/users/soltysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltysh/subscriptions","organizations_url":"https://api.github.com/users/soltysh/orgs","repos_url":"https://api.github.com/users/soltysh/repos","events_url":"https://api.github.com/users/soltysh/events{/privacy}","received_events_url":"https://api.github.com/users/soltysh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":47,"created_at":"2016-06-27T14:25:00Z","updated_at":"2017-02-24T10:47:19Z","closed_at":null,"body":"I want to declare an ImageStream that tracks an external docker image located on an authenticated docker registry.\n\nMy use-case is:\n- build docker images for our internal applications as part of our CI pipeline\n- have the CI pipeline push the docker image to external registry (eg. gitlab) on success\n- track the docker images from many OpenShift environments (using ImageStreams)\n- redeploy all relevant applications in OpenShift when their docker image has been updated (using image change triggers)\n\nSo far, I have found no way to declare an ImageStream which uses a secret to pull the image.\n\nI have found 2 workarounds:\n- either use S2I source builds (then what we deploy wont be the docker image build in CI)\n- either use an inline dockerfile (eg. FROM registry.internal.mycompany.com/myapp) but then how do I trigger a new build since ImageStream still cannot follow the source image).\n\nI have also tried without success to run `docker login` on the Openshift hosts, in the hope that the image puller would run as same user and implicitly use my dockercfg but no success.\n##### Version\n\n``` sh\n$ oc version\noc v1.2.0\nkubernetes v1.2.0-36-g4a3f9c5\n```\n##### Steps To Reproduce\n\nRun the following commands (after adjusting docker image source to point to an authenticated docker registry).\n\n``` sh\n$ cat <<EOF | tee is.yaml\napiVersion: v1\nkind: ImageStream\nmetadata:\n  name: myapp\nspec:\n  tags:\n  - from:\n      kind: DockerImage\n      name: registry.internal.company.com/projects/myapp:latest\n    name: latest\nEOF\n$ oc create -f is.yaml\nimagestream \"myapp\" created\n$ oc get is\nNAME               DOCKER REPO                               TAGS      UPDATED\nmyapp              10.10.166.188:5000/gio/myapp              latest    \n$ oc import-image myapp\nThe import completed successfully.\n\nName:           myapp\nCreated:        14 seconds ago\nLabels:         <none>\nAnnotations:        openshift.io/image.dockerRepositoryCheck=2016-06-27T14:15:06Z\nDocker Pull Spec:   10.10.166.188:5000/project/myapp\n\nTag Spec                                Created     PullSpec    Image\nlatest  registry.internal.company.com/projects/myapp:latest 13 seconds ago          import failed: Internal error occurred: Get https://registry.intern....\n```\n##### Current Result\n\nImage fails to import because the image puller does not use any secret.\n##### Expected Result\n\nImageStream should provide a way to specify a secret to use when pulling the image (with a mechanism similar to pullSecret in BuildConfig dockerStrategy).\n"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/282262152","html_url":"https://github.com/openshift/origin/issues/9584#issuecomment-282262152","issue_url":"https://api.github.com/repos/openshift/origin/issues/9584","id":282262152,"user":{"login":"dkarlovi","id":209225,"avatar_url":"https://avatars.githubusercontent.com/u/209225?v=3","gravatar_id":"","url":"https://api.github.com/users/dkarlovi","html_url":"https://github.com/dkarlovi","followers_url":"https://api.github.com/users/dkarlovi/followers","following_url":"https://api.github.com/users/dkarlovi/following{/other_user}","gists_url":"https://api.github.com/users/dkarlovi/gists{/gist_id}","starred_url":"https://api.github.com/users/dkarlovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkarlovi/subscriptions","organizations_url":"https://api.github.com/users/dkarlovi/orgs","repos_url":"https://api.github.com/users/dkarlovi/repos","events_url":"https://api.github.com/users/dkarlovi/events{/privacy}","received_events_url":"https://api.github.com/users/dkarlovi/received_events","type":"User","site_admin":false},"created_at":"2017-02-24T10:47:19Z","updated_at":"2017-02-24T10:47:19Z","body":"I'm having exactly the same issue with Gitlab's Registry. I'm able to reference images from ImageStream, but unable to run a deploy, it fails to pull from the Registry (even though I can see image metadata and everything).\r\n\r\nI've also checked `oc images` and my images are there (?), don't understand why my deploy fails. This is weird.\r\n\r\nA good idea might be to check this against Gitlab+Registry combo as Gitlab's popularity will surely expose this functionality to a large number of users. A documentation HOWTO might also be a good idea."}}
{"actor":{"display_login":"dkarlovi"}}