From a56835e1a80578c0c3d784cab913ed0b21ebc533 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Jan 2025 17:03:07 +0100 Subject: [PATCH] docs: Adjust doc comment Signed-off-by: Techassi --- kube-derive/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kube-derive/src/lib.rs b/kube-derive/src/lib.rs index 83e008caa..a03217d76 100644 --- a/kube-derive/src/lib.rs +++ b/kube-derive/src/lib.rs @@ -129,9 +129,21 @@ mod resource; /// NOTE: `CustomResourceDefinition`s require a schema. If `schema = "disabled"` then /// `Self::crd()` will not be installable into the cluster as-is. /// -/// ## `#[kube(scale = r#"json"#)]` +/// ## `#[kube(scale(...))]` +/// /// Allow customizing the scale struct for the [scale subresource](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#subresources). /// +/// ```no_run +/// #[kube(scale( +/// specReplicasPath = ".spec.replicas", +/// statusReplicaPath = ".status.replicas", +/// labelSelectorPath = ".spec.labelSelector" +/// ))] +/// ``` +/// +/// The deprecated way of customizing the scale subresource using a raw JSON string is still +/// support for backwards-compatibility. +/// /// ## `#[kube(printcolumn = r#"json"#)]` /// Allows adding straight json to [printcolumns](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#additional-printer-columns). ///