Math Transforms: Document `ClampMin` and `ClampMax`

Feature added in this PR: https://github.com/crossplane/crossplane/pull/3917

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
This commit is contained in:
Julien Duchesne 2023-04-09 22:58:19 -04:00 committed by Julien Duchesne
parent b1423cef55
commit cc2d868032
1 changed files with 26 additions and 1 deletions

View File

@ -904,14 +904,39 @@ transform.
```
`math`. Transforms values using math. The input value must be an integer.
Currently only `multiply` is supported.
* math transform type `Multiply`, multiplies the input by the given value.
* math transform type `ClampMin`, sets a minimum value for the input.
* math transform type `ClampMax`, sets a maximum value for the input.
```yaml
# If you omit the field type, by default type is set to `Multiply`
# If the value of the 'from' field is 2, the value of the 'to' field will be set
# to 4.
- type: math
math:
multiply: 2
# This is the same as above
# If the value of the 'from' field is 2, the value of the 'to' field will be set
# to 4.
- type: math
math:
type: Multiply
multiply: 2
# If the value of the 'from' field is 3, the value of the 'to' field will
# be set to 4.
- type: math
math:
type: ClampMin
clampMin: 4
# If the value of the 'from' field is 3, the value of the 'to' field will
# be set to 2.
- type: math
math:
type: ClampMax
clampMax: 2
```
`string`. Transforms string values.