Bug 1888550

Summary: [Doc] operator-sdk new command doesn't support the Golang type anymore
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: DocumentationAssignee: Shubha Narayanan <snarayan>
Status: CLOSED CURRENTRELEASE QA Contact: Jian Zhang <jiazha>
Severity: medium Docs Contact: Latha S <lmurthy>
Priority: high    
Version: 4.6CC: aos-bugs, jokerman, lmurthy
Target Milestone: ---   
Target Release: 4.6.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: 2021-09-30 06:57:31 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 Jian Zhang 2020-10-15 07:49:03 UTC
Document URL: 
https://docs.openshift.com/container-platform/4.6/operators/operator_sdk/osdk-getting-started.html#building-memcached-operator-using-osdk_osdk-getting-started


Section Number and Name: 

Building a Go-based Operator using the Operator SDK

Describe the issue: 
For 4.6, the operator-sdk version is v.0.19.x, But, it doesn't support the Golang type.
[root@preserve-olm-env example-inc]# operator-sdk version
operator-sdk version: "v0.19.4-5-gef0bc88", commit: "ef0bc885e40e6c86c0c079bea612b4eb908f6ec5", kubernetes version: "v1.18.2", go version: "go1.14 linux/amd64"

[root@preserve-olm-env example-inc]# operator-sdk new memcached-operator
Error: required flag(s) "type" not set
...
...
      --type string                 Type of operator to initialize (choices: "ansible" or "helm")
FATA[0000] required flag(s) "type" not set 

Suggestions for improvement: 
We can use the Helm or the Ansible type instead, or still use the Golang type by using the "operator-sdk init", but the following steps are need to be updates bigly. You can refer to the steps for Golang type: https://v0-19-x.sdk.operatorframework.io/docs/golang/quickstart/

Additional information:

Comment 2 Shubha Narayanan 2021-09-30 06:57:31 UTC
This issue is already fixed in PR https://github.com/openshift/openshift-docs/pull/31988 hence closing the bug.