docs(compositions): Add docs for quantity transform (#292)

Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>

Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>
This commit is contained in:
MisterMX 2023-01-24 03:06:23 +01:00 committed by GitHub
parent 0e8d93f756
commit 2deefae089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -779,6 +779,17 @@ true converts to integer 1 and float 1.0, while false converts to 0 and 0.0.
toType: int
```
Converting `string` to `float64` additionally supports parsing string in
[K8s quantity format](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity),
such as `1000m` or `500 Mi`:
```yaml
- type: convert
convert:
toType: float64
format: quantity
```
### Connection Details
Connection details secret of XR is an aggregated sum of the connection details