Skip to content

Deployments from ImageStream do not work for manual deploy #8937

Closed

Description

@tnozicka

The way you can specify Deployments to start from an ImageStream instead of an image is to specify image: " " and trigger from ImageChange.

"kind": "DeploymentConfig"
...
"triggers": [
  {
    "type": "ImageChange",
      "imageChangeParams": {
         "automatic": true,
         "containerNames": [
           "jenkins"
          ],
          "from": {
            "kind": "ImageStreamTag",
            "name": "jenkins:latest",
            "namespace": "openshift"
          }
  },
...
"template": {
...
  "spec": {
    "containers": [
      {   
        "name": "jenkins",
        "image": " ",
      }, 
...

This will fail at deployment #1 letting you wait about a minute (because of inability to pull image " ") and then re-deploy as #2 from the ImageStream. @smarterclayton said that someone is working on that [1].

The bigger issue comes if you decide to use
"imageChangeParams": { "automatic": false
which is a valid choice if you do not want to re-deploy your Jenkins
master while doing some important tasks.

This way you will end up with failed deployment #1 and you have to
manually deploy #2 but since you are triggering the build manually it
starts from image " " and fails again. You will be stuck in this loop
and never get it deployed this way!

The previous discussion on mailing list is in [1].

[1] - https://lists.openshift.redhat.com/openshift-archives/dev/2016-May/msg00047.html

Version

$ oc version
oc v1.3.0-alpha.0-588-g665eb4b
kubernetes v1.3.0-alpha.1-331-g0522e63

Steps To Reproduce
  1. Import template
curl -G https://raw.githubusercontent.com/tnozicka/origin/fix-jenkins-persistent-template/examples/jenkins/jenkins-persistent-template.json | sed 's/"automatic": true/"automatic": false/' | oc create -n openshift -f -
  1. Use that template to run Jenkins
  2. Push Deploy in web console to re-deploy Jenkins after deployment #1 fails on inability to pull image " "
Current Result

Always deploys from image " "

Expected Result
  1. Deploys from ImageStream and not from image " "
  2. Does not fail first time (deployment #1)
Additional Information

Using ADB 2.0 with latest origin containers

Activity

  1. changed the title [-]Deployments from ImageStream does not work for manual deploy[/-] [+]Deployments from ImageStream do not work for manual deploy[/+] on May 19, 2016
  2. pweil- commented on May 19, 2016

    @pweil-
  3. 0xmichalis commented on May 19, 2016

    @0xmichalis
    Contributor

    Should be fixed by #8937

  4. smarterclayton commented on May 19, 2016

    @smarterclayton
    Contributor

    You mean #8746?

  5. 0xmichalis commented on May 19, 2016

    @0xmichalis
    Contributor

    You mean #8746?

    Right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions