Bug 1619186 - API server is missing Kind=BuildConfig after kind of buildconfig parametered when new-app
Summary: API server is missing Kind=BuildConfig after kind of buildconfig parametered...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: David Eads
QA Contact: wewang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-20 09:49 UTC by wewang
Modified: 2018-10-11 07:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:25:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:25:45 UTC

Description wewang 2018-08-20 09:49:47 UTC
Description of problem:
API server is missing declared resources: /v1, Kind=BuildConfig after kind of  buildconfig parametered when creating build

Version-Release number of selected component (if applicable):
openshift v3.11.0-0.17.0
oc v3.11.0-0.17.0

How reproducible:
always

Steps to Reproduce:
1.Create app with  application-template-parameters.json which multiple parameters in the template
$ oc new-app https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/templates/tc479059/application-template-parameters.json 
      --> Deploying template "aaaja/ruby-helloworld-sample" for "https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/templates/tc479059/application-template-parameters.json" to project aaaja
      
           ruby-helloworld-sample
           ---------
           This example shows how to create a simple ruby application in openshift origin v3
      
           * With parameters:
              * ADMIN_USERNAME=adminKCY # generated
              * ADMIN_PASSWORD=NBAF5wnS # generated
              * MYSQL_USER=userFGS # generated
              * MYSQL_PASSWORD=v5LcMJL5 # generated
              * MYSQL_DATABASE=root
              * GIT_URI=git://github.com/openshift/ruby-hello-world.git
              * KIND_BC=BuildConfig
              * IMAGESTREAM_SPEC_REPO=centos/ruby-23-centos7
      
      
      STDERR:
      error: API server is missing declared resources: /v1, Kind=BuildConfig


2.
3.

Actual results:
Cannot create buildconfig

Expected results:
Should create buildconfig
Additional info:

Comment 1 Ben Parees 2018-08-20 20:28:57 UTC
David and I looked at this and it seems to be caused by the use of a parameter for the Kind value in the template, which results in it not being handled by the logic that's supposed to convert all the legacy types to groupified types.

Comment 2 David Eads 2018-08-21 12:22:30 UTC
fixed by https://github.com/openshift/origin/pull/20710

Also, what's the use-case for replacing a kind?

Comment 3 Ben Parees 2018-08-21 14:00:56 UTC
I think it's more that there's no use case for us trying to control what you can/can't substitute, so we don't.

I wouldn't have felt guilty closing particular scenario as "won't fix".

Comment 4 wewang 2018-08-27 10:03:52 UTC
verified in oc v3.11.0-0.22.0

steps:
$ oc new-app https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/templates/tc479059/application-template-parameters.json 
--> Deploying template "wewang1/ruby-helloworld-sample" for "https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/templates/tc479059/application-template-parameters.json" to project wewang1

     ruby-helloworld-sample
     ---------
     This example shows how to create a simple ruby application in openshift origin v3

     * With parameters:
        * ADMIN_USERNAME=admin4OI # generated
        * ADMIN_PASSWORD=dqCCvOiC # generated
        * MYSQL_USER=userTHD # generated
        * MYSQL_PASSWORD=QdvTfG3u # generated
        * MYSQL_DATABASE=root
        * GIT_URI=git://github.com/openshift/ruby-hello-world.git
        * KIND_BC=BuildConfig
        * IMAGESTREAM_SPEC_REPO=centos/ruby-23-centos7

--> Creating resources ...
    imagestream.image.openshift.io "origin-ruby-sample" created
    imagestream.image.openshift.io "ruby-23-centos7" created
    buildconfig.build.openshift.io "ruby-sample-build" created
    deploymentconfig.apps.openshift.io "frontend" created
--> Success
    Build scheduled, use 'oc logs -f bc/ruby-sample-build' to track its progress.
    Run 'oc status' to view your app.
$ oc get builds
NAME                  TYPE      FROM          STATUS    STARTED   DURATION
ruby-sample-build-1   Source    Git@7ccd324   Pending             
$ oc get builds
NAME                  TYPE      FROM          STATUS    STARTED         DURATION
ruby-sample-build-1   Source    Git@7ccd324   Running   8 seconds ago   
[wewang@wen-local ~]$ oc version
oc v3.11.0-0.22.0
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Comment 6 errata-xmlrpc 2018-10-11 07:25:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2652


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