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

Bug 1802498

Summary: [operator-sdk][upstream] "generate crds" doesn't exist
Product: OpenShift Container Platform Reporter: Fan Jia <jfan>
Component: Operator SDKAssignee: Joe Lanford <jlanford>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: aos-bugs
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 11:36:23 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 Fan Jia 2020-02-13 10:11:31 UTC
Description of problem:
According to https://github.com/operator-framework/operator-sdk/pull/2276, operator sdk deprecate 'generate openapi', add 'generate crds'.But the latest master operator-sdk doesn't support generate crds.

Version-Release number of selected component (if applicable):
operator-sdk master
commit:0eac8a1169dfc0a8918b9e41ada6278307a0852b

How reproducible:
always

Steps to Reproduce:
1.Install operator-sdk CLI 
2.run operator-sdk generate crds
 #operator-sdk generate crds

Actual results:
1. #operator-sdk generate crds
The operator-sdk generate command invokes specific generator to generate code as needed.

Usage:
  operator-sdk generate [command]

Available Commands:
  k8s         Generates Kubernetes code for custom resource
  openapi     Generates OpenAPI specs for API's

Flags:
  -h, --help   help for generate

Global Flags:
      --verbose   Enable verbose logging

Use "operator-sdk generate [command] --help" for more information about a command.

Expected results:
operator-sdk should support `operator-sdk generate crds` , do not support `operator-sdk generate openapi` anymore.


Additional info:
operator-sdk generate openapi can work

Comment 2 Fan Jia 2020-02-14 01:19:34 UTC
retest:
1)#operator-sdk version:
operator-sdk version: "v0.15.0-37-g0eac8a11", commit: "0eac8a1169dfc0a8918b9e41ada6278307a0852b", go version: "go1.13.5 linux/amd64"

2)# operator-sdk  generate --help
The 'operator-sdk generate' command invokes a specific generator to generate
code or manifests on disk.

Usage:
  operator-sdk generate [command]

Available Commands:
  crds        Generates CRDs for API's
  csv         Generates a ClusterServiceVersion YAML file for the operator
  k8s         Generates Kubernetes code for custom resource

Flags:
  -h, --help   help for generate

Global Flags:
      --verbose   Enable verbose logging

Use "operator-sdk generate [command] --help" for more information about a command.

3)# operator-sdk  generate crds
INFO[0000] Running CRD generator.                       
INFO[0010] CRD generation complete.    

# tree deploy/crds/
deploy/crds/
├── cache.example.com_memcacheds_crd.yaml
└── cache_v1alpha1_memcached_cr.yaml

Comment 5 errata-xmlrpc 2020-05-04 11:36:23 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-2020:0581