You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: kube-derive/src/lib.rs
+13-1
Original file line number
Diff line number
Diff line change
@@ -129,9 +129,21 @@ mod resource;
129
129
/// NOTE: `CustomResourceDefinition`s require a schema. If `schema = "disabled"` then
130
130
/// `Self::crd()` will not be installable into the cluster as-is.
131
131
///
132
-
/// ## `#[kube(scale = r#"json"#)]`
132
+
/// ## `#[kube(scale(...))]`
133
+
///
133
134
/// Allow customizing the scale struct for the [scale subresource](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#subresources).
134
135
///
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
+
///
135
147
/// ## `#[kube(printcolumn = r#"json"#)]`
136
148
/// Allows adding straight json to [printcolumns](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#additional-printer-columns).
0 commit comments