Better top-level CRD descriptions
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- kubernetes, rust
- Domain
- infrastructure
Research direction
Start in kube-derive/src/custom_resource.rs, especially KubeAttrs and the derive function shown in the issue. Trace how the custom resource description is currently generated, then verify that an optional description can be accepted and used for the top-level CRD description while preserving the existing default.
Written by the indexing model from the issue text.
Description
We need to patch it in kube-rs to be able to edit this property.
diff --git a/kube-derive/src/custom_resource.rs b/kube-derive/src/custom_resource.rs
index 177abe7d..a02160b1 100644
--- a/kube-derive/src/custom_resource.rs
+++ b/kube-derive/src/custom_resource.rs
@@ -10,6 +10,7 @@ struct KubeAttrs {
group: String,
version: String,
kind: String,
+ description: Option<String>,
#[darling(rename = "root")]
kind_struct: Option<String>,
/// lowercase plural of kind (inferred if omitted)
@@ -145,6 +146,7 @@ pub(crate) fn derive(input: proc_macro2::TokenStream) -> proc_macro2::TokenStrea
kind,
kind_struct,
version,
+ description,
namespaced,
derives,
schema: schema_mode,
@@ -239,7 +241,8 @@ pub(crate) fn derive(input: proc_macro2::TokenStream) -> proc_macro2::TokenStrea
derive_paths.push(syn::parse_quote! { #schemars::JsonSchema });
}
- let docstr = format!(" Auto-generated derived type for {ident} via `CustomResource`");
+ let docstr = description
+ .unwrap_or_else(|| format!(" Auto-generated derived type for {ident} via `CustomResource`"));
let quoted_serde = Literal::string(&serde.to_token_stream().to_string());
let root_obj = quote! {
#[doc = #docstr]
- Dominant language
- CSS
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stackabletech/crddocs
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
stackabletech/crddocs#57 ·
-
Dependency Dashboard Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
stackabletech/crddocs#37 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
stackabletech/crddocs#21 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
stackabletech/crddocs#17 ·
-
Accessibility Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
stackabletech/crddocs#14 ·
All issues in stackabletech/crddocs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
danielmiessler/LifeOS#2215 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·