Bug 1539575 - [3.5] Updating trigger with oc set trigger --from-image points to unextected namespace when using "-n"
Summary: [3.5] Updating trigger with oc set trigger --from-image points to unextected ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-controller-manager
Version: 3.5.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: Michal Fojtik
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks: 1543360
TreeView+ depends on / blocked
 
Reported: 2018-01-29 08:53 UTC by Carsten Lichy-Bittendorf
Modified: 2018-06-18 18:28 UTC (History)
6 users (show)

Fixed In Version: v3.9.0-0.34.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1543360 (view as bug list)
Environment:
Last Closed: 2018-06-18 14:33:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Carsten Lichy-Bittendorf 2018-01-29 08:53:32 UTC
Description of problem:

running: 
   'oc set triggers dc/jenkins --containers jenkins --from-image='openshift/my-jenkins:verified-1.1' -n my-test-project'
does unexpectedly set namespace of image, while expected is to limit the search in which dc this get applied to.

Version-Release number of selected component (if applicable):

openshift v3.5.5.31.36
kubernetes v1.5.2+43a9be4

How reproducible:


Steps to Reproduce:
1. create project 'myproject' and deploy some app, so that you have a dc
2. run a 'oc set triggers' including parameter '-n myproject'
3.

Actual results:
dc will contain:
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - jenkins
        from:
          kind: ImageStreamTag
          name: my-jenkins:verified-1.1
          namespace: my-test-project
      type: ImageChange


Expected results:
dc should look like:
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - jenkins
        from:
          kind: ImageStreamTag
          name: my-jenkins:verified-1.1
          namespace: openshift
      type: ImageChange

Additional info:

'oc set triggers --help' doesn't give any hint that '-n' is applied to image and not to the object as usual.

Comment 1 Michal Fojtik 2018-01-29 12:21:01 UTC
Fix: https://github.com/openshift/origin/pull/18327

Comment 4 Wang Haoran 2018-02-02 10:30:49 UTC
Verified with:
oc v3.9.0-0.34.0
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://host-8-243-252.host.centralci.eng.rdu2.redhat.com:8443
openshift v3.9.0-0.34.0
kubernetes v1.9.1+a0ce1bc657

Feel free to clone a bug to 3.6 if you decide to backport this.


Note You need to log in before you can comment on or make changes to this bug.