-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docs: section about dropped openapi option #3243
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
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7e4230a
feat(faq.md): section about dropped openapi option
georgettica 1133126
Update website/content/en/docs/faq.md
georgettica 550de7d
Update website/content/en/docs/faq.md
georgettica 6e8f665
Update website/content/en/docs/faq.md
georgettica 0ac3259
fix(faq): fix boilerplate flag
georgettica 1c194f3
Update website/content/en/docs/faq.md
georgettica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the example? I think we should embed that directly in the FAQ.
Note that we're switching to the kubebuilder-based project layout in #3190, so we should make the example work for that project structure (not our existing project structure).
@hasbro17 did you run across an examples in our docs for running openapi-gen that had to change due to the new layout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelanford Hmm no. The only place where we mention how to use openapi-gen is in the version upgrade guide right around the time we dropped support for
operator-sdk generate openapi.https://sdk.operatorframework.io/docs/migration/version-upgrade-guide/#v017x
But I guess for the new project layout you'd just need to update the input/output package paths to your API Go types and you can use that:
Oh also, with Kubebuilder we don't have the
// +k8s:openapi-gen=truetags in our<kind>_type.goscaffolds anymore. So you'd probably need to add those to the Go types yourself.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @georgettica could you please check it with the new layout to provide the example? To do that you need use the master branch and run
mkdir <projectname>,cd <projectname>and then,operator-sdk init. It will scaffold the project with the new layout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it skaffold a current project with the new information? for I got a confusing result.
I ran the command on my current operator and recieved an error but files and folders were created.
When I ran the init command a
hack/boilerplate.go.txtwas created so if I were using the command in https://sdk.operatorframework.io/docs/migration/version-upgrade-guide/#v017xand I guess the tags
// +k8s:openapi-gen=truewere removed for extracting the openapi-gen from the codebase, so a not should refer to thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @georgettica,
SDK is in a process to be integrated with KB which means that its project layouts will be aligned. More info : Integrating Kubebuilder and Operator SDK. If you run
operator-sdk inityou will scaffold a project with the new layout.What is missing here is we provide the example and the info let the users know how to do with the Legacy layout and the new one. Is it make sense?