Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1619186

Summary: API server is missing Kind=BuildConfig after kind of buildconfig parametered when new-app
Product: OpenShift Container Platform Reporter: wewang <wewang>
Component: ocAssignee: David Eads <deads>
Status: CLOSED ERRATA QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, bparees, jokerman, mfojtik, mmccomas
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:25:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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