Bug 1802498 - [operator-sdk][upstream] "generate crds" doesn't exist
Summary: [operator-sdk][upstream] "generate crds" doesn't exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Operator SDK
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Joe Lanford
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 10:11 UTC by Fan Jia
Modified: 2020-05-04 11:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:36:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:36:42 UTC

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


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