Skip to content

Be able to execute the commands operator-sdk generate k8s and openapi… #2054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Oct 12, 2019

Description of the change:

  • Change sub-commands for no longer relay in the Dockerfile and main.go files.

PS.: It was tested/review already for 2 teammates but we revert this one in order to not risk the release. Also, the Changelog was improved as suggested by @joelanford.

Motivation for the change:
Closes: #1804 and #1686
PS.: Helpful for #1964

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 12, 2019
… without relay in the existence of the Dockerfile and/or main.go one.
@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-subcommand

@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-ansible

@joelanford
Copy link
Member

I'm not sure I agree with the motivations from #1804 and #1686. For those cases, it may be more reasonable to tell users to use controller-gen directly. That would give users total flexibility for generating CRDs and code outside of the context of an SDK project.

IMO operator-sdk generate is effectively nice wrapper of controller-gen for use in SDK projects. It knows where to find APIs, and it outputs files in known (and non-overridable) locations that are specific to SDK project structures. For those reasons, I think it makes sense for the operator-sdk binary to check that it is in an SDK project.

In the future when we have integrated Kubebuilder scaffolding, the generate subcommands will be replaced by make targets that call controller-gen directly, and this problem will be solved. In the meantime, I would suggest that we close #1804 and #1686 by commenting in them with the equivalent controller-gen command to run and link to #1600 (comment) for background about why we're hesitant to support more flexibility in the existing subcommands.

@joelanford
Copy link
Member

/hold

Based on my above comment, I think there needs to be more discussion about whether we want to take this approach.

@camilamacedo86
Copy link
Contributor Author

Closing this one as defined.

@camilamacedo86 camilamacedo86 deleted the OSDK-566 branch October 15, 2019 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs discussion size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generate: subcommands should only require pkg/apis exist, not full project
3 participants