-
Notifications
You must be signed in to change notification settings - Fork 450
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
Fix truncated descriptions in the CRDs #2563
Conversation
Signed-off-by: Israel Blancas <[email protected]>
Signed-off-by: Israel Blancas <[email protected]>
Signed-off-by: Israel Blancas <[email protected]>
Signed-off-by: Israel Blancas <[email protected]>
@iblancasa we had to do this because we were reaching a limit for the size of a crd's annotations field. I'm not sure there's a way around this... cc @pavolloffay |
Ok, I see. Since the problem is with the generated docs... how about increasing the limit just for the docs? I can generate the CRDs without a limit in the description and generate the documentation from there. The CRDs shipped as part of the bundle will remain intact. Also, @swiatekm-sumo suggestion sounds like something we should do too. What do you think? |
The max description length was decreased in #1981. I would prefer a solution where we could decide which fields would be truncated. |
I'm not sure that can be done except doing them shorter. |
…iptions in the MD Signed-off-by: Israel Blancas <[email protected]>
Signed-off-by: Israel Blancas <[email protected]>
Makefile
Outdated
@@ -479,8 +480,11 @@ bundle-push: | |||
api-docs: crdoc kustomize | |||
@{ \ | |||
set -e ;\ | |||
TMP_MANIFEST_DIR=$$(mktemp -d) ; \ | |||
cp -r config/crd/* $$TMP_MANIFEST_DIR; \ | |||
$(MAKE) CRD_OPTIONS=$(CRD_OPTIONS),maxDescLen=800 MANIFEST_DIR=$$TMP_MANIFEST_DIR/bases manifests ;\ |
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.
Why here is ,maxDescLen=800
and the length is also defined in CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true,maxDescLen=200"
?
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.
This will call the manifests
target using CRD_OPTIONS="crd:generateEmbeddedObjectMeta=true,maxDescLen=200",maxDescLen=800
. The second maxDescLen
overrides the first one. By doing this, we can:
- Reuse the value of
CRD_OPTIONS
- Use the new value for
maxDescLen
without polluting the bundle
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.
Do we actually need the max length for the api-docs?
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.
It is easier to add a high value than implementing a sed command to remove it from the command 😅
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.
@jaronoff97 @pavolloffay we need to merge this if we want to actually release v1beta1.
i'm good to merge this, @pavolloffay any objections? |
@iblancasa could you please rebase this one? |
* Fix truncated descriptions in the documentation Signed-off-by: Israel Blancas <[email protected]> * Add other generated files Signed-off-by: Israel Blancas <[email protected]> * Undo change in version Signed-off-by: Israel Blancas <[email protected]> * Add changelog Signed-off-by: Israel Blancas <[email protected]> * Revert changes in manifest CRDs. Add a way to generate the long descriptions in the MD Signed-off-by: Israel Blancas <[email protected]> * Fix changelog Signed-off-by: Israel Blancas <[email protected]> --------- Signed-off-by: Israel Blancas <[email protected]>
* Fix truncated descriptions in the documentation Signed-off-by: Israel Blancas <[email protected]> * Add other generated files Signed-off-by: Israel Blancas <[email protected]> * Undo change in version Signed-off-by: Israel Blancas <[email protected]> * Add changelog Signed-off-by: Israel Blancas <[email protected]> * Revert changes in manifest CRDs. Add a way to generate the long descriptions in the MD Signed-off-by: Israel Blancas <[email protected]> * Fix changelog Signed-off-by: Israel Blancas <[email protected]> --------- Signed-off-by: Israel Blancas <[email protected]>
Fixes #2561.