Bug 2064610 - openshift template cakephp-mysql-persistent has a typo in apiVersion for DeploymentConfig
Summary: openshift template cakephp-mysql-persistent has a typo in apiVersion for Depl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Samples
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 4.10.z
Assignee: David Peraza
QA Contact: Sushanta Das
URL:
Whiteboard:
: 2117516 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-16 09:27 UTC by Qiujie Li
Modified: 2023-09-18 04:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-10 06:48:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-samples-operator pull 417 0 None open Bug 2064610: Remove duplicate v1 from cakephp-mysql templates 2022-04-05 02:26:40 UTC

Description Qiujie Li 2022-03-16 09:27:24 UTC
Description of problem:
'oc new-app --template cakephp-mysql-persistent' failed. 
Result: error: The template contained an object type unknown to oc new-app. Use oc process -f <template> | oc create -f - instead. Error details: no kind "DeploymentConfig" is registered for version "apps.openshift.io/v1v1" in scheme "k8s.io/kubectl/pkg/scheme/scheme.go:28"

The template has a duplicated v1 in apiVersion for DeploymentConfig.

% oc get template cakephp-mysql-persistent -n openshift -o yaml | grep v1v1 -A 1
- apiVersion: apps.openshift.io/v1v1
  kind: DeploymentConfig


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


How reproducible: Every time


Steps to Reproduce:
1.oc new-app --template cakephp-mysql-persistent

Actual results:
Can not install cakephp-mysql-persistent with 'oc new-app' command.

Expected results:
Install cakephp-mysql-persistent with 'oc new-app' command successfully.

Additional info:

Comment 1 David Peraza 2022-04-05 01:55:36 UTC
Sent PR for the source of the problem so that new library sync will not carry this issue: https://github.com/sclorg/cakephp-ex/pull/131

Comment 2 David Peraza 2022-04-05 02:09:55 UTC
Also sent the PR to fix in library repo: https://github.com/openshift/library/pull/306

Comment 3 David Peraza 2022-04-05 02:54:40 UTC
@qili can you set the severity of this bug as you see it, any customer affected by this?

Comment 8 Feny Mehta 2022-08-22 07:35:59 UTC
*** Bug 2117516 has been marked as a duplicate of this bug. ***

Comment 10 Feny Mehta 2022-10-03 06:27:41 UTC
@igreen 

Have made changes https://github.com/openshift/cluster-samples-operator/pull/466 to bacport this to 4.10 

this will reflect once there is a next release for ocp4.10.z(probably around mid october)

Comment 12 Sushanta Das 2022-10-08 16:18:02 UTC
Verified with the changes on 4.10

Server Version: 4.10.0-0.ci.test-2022-10-08-145331-ci-ln-00iy2xb-latest
Kubernetes Version: v1.23.5-rc.0.2080+84715916456c9a-dirty



$ oc new-app --template cakephp-mysql-persistent -n mysqlns
--> Deploying template "openshift/cakephp-mysql-persistent" to project mysqlns

     CakePHP + MySQL
     ---------
     An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.

     The following service(s) have been created in your project: cakephp-mysql-persistent, mysql.
     
     For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.


$ oc get route -n mysqlns
NAME                       HOST/PORT                                                                                     PATH   SERVICES                   PORT    TERMINATION   WILDCARD
cakephp-mysql-persistent   cakephp-mysql-persistent-mysqlns.apps.ci-ln-00iy2xb-76ef8.origin-ci-int-aws.dev.rhcloud.com          cakephp-mysql-persistent   <all>                 None
$

$ curl cakephp-mysql-persistent-mysqlns.apps.ci-ln-00iy2xb-76ef8.origin-ci-int-aws.dev.rhcloud.com -I
HTTP/1.1 200 OK
date: Sat, 08 Oct 2022 16:16:33 GMT
server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k
content-type: text/html; charset=UTF-8
set-cookie: baac3147a2580433bb8e37a8ca0c5f0c=3985f59e2a532420c08f68c3335f4b18; path=/; HttpOnly
cache-control: private
$

Comment 14 Feny Mehta 2022-10-13 06:40:58 UTC
This will be picked up for 
- Planned: 4.10.37 - Ship date: 18-Oct

@smulje, we have moved from Bugzilla to Jira for bug please track this in Jira - https://issues.redhat.com/browse/OCPBUGS-2132

Thanks

Comment 17 Red Hat Bugzilla 2023-09-18 04:33:35 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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