Skip to content

Commit a56835e

Browse files
committed
docs: Adjust doc comment
Signed-off-by: Techassi <git@techassi.dev>
1 parent 7ceb796 commit a56835e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

kube-derive/src/lib.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,21 @@ mod resource;
129129
/// NOTE: `CustomResourceDefinition`s require a schema. If `schema = "disabled"` then
130130
/// `Self::crd()` will not be installable into the cluster as-is.
131131
///
132-
/// ## `#[kube(scale = r#"json"#)]`
132+
/// ## `#[kube(scale(...))]`
133+
///
133134
/// Allow customizing the scale struct for the [scale subresource](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#subresources).
134135
///
136+
/// ```no_run
137+
/// #[kube(scale(
138+
/// specReplicasPath = ".spec.replicas",
139+
/// statusReplicaPath = ".status.replicas",
140+
/// labelSelectorPath = ".spec.labelSelector"
141+
/// ))]
142+
/// ```
143+
///
144+
/// The deprecated way of customizing the scale subresource using a raw JSON string is still
145+
/// support for backwards-compatibility.
146+
///
135147
/// ## `#[kube(printcolumn = r#"json"#)]`
136148
/// Allows adding straight json to [printcolumns](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#additional-printer-columns).
137149
///

0 commit comments

Comments
 (0)