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: docs/reference.md
+25-2
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,31 @@ Although it is limited only to Kubernetes resources it makes it very easy to use
8
8
9
9
## Generic Notes
10
10
11
-
- All templates (both object and string based) uses [Qute templating engine](https://quarkus.io/guides/qute-reference). While objects allow only
12
-
placeholders, you can use the full power of qute in string templates.
11
+
- All templates (both object and string-based) uses [Qute templating engine](https://quarkus.io/guides/qute-reference). While objects allow only
12
+
placeholders, you can use the full power of qute in string templates.
13
+
14
+
ONLY for object-based templates (thus not string templates) the values can be set using the placeholder notation from Qute:
15
+
```yaml
16
+
value: "{string.value}"
17
+
```
18
+
With this standard notation, the result value will be always encoded in double quotes:
19
+
```yaml
20
+
value: "1"
21
+
```
22
+
Since there is no simple way to check if the referenced value is a string or other value
23
+
(boolean, numeric, etc) for non-string values, user should use double brackets:
24
+
```yaml
25
+
value: "{{nonstring.value}}"
26
+
```
27
+
what would result in a value without enclosed double quotes in the produced yaml:
28
+
```yaml
29
+
value: 1
30
+
```
31
+
See sample [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.operator.yaml#L10).
32
+
Implementation wise, this is a preprocessor that strips the enclosed quotes and additional curly bracket
33
+
before it is passed to Qute.
34
+
In the future, we might remove such obligation by checking the type
0 commit comments