Skip to content

Commit a7d3049

Browse files
committed
OCPBUGS-54740#Add --show-template-functions to cluster-compare plugin options
1 parent 6969339 commit a7d3049

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

Diff for: modules/cluster-compare-reference-args.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ You must use a file path for the target template that is relative to the `metada
5858
| `--show-managed-fields`
5959
| Specify `true` to include managed fields in the comparison.
6060

61+
| `--show-template-functions`
62+
| Displays available template functions.
63+
6164
| `-v`, `--verbose`
6265
| Increases the verbosity of the plugin output.
6366

Diff for: modules/cluster-compare-templating-reference.adoc

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Module included in the following assemblies:
2+
3+
// *scalability_and_performance/cluster-compare/creating-a-reference-configuration.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
7+
[id="cluster-compare-templating-reference_{context}"]
8+
= Reference template functions
9+
10+
The `cluster-compare` plugin supports all `sprig` library functions, except for the `env` and `expandenv` functions.
11+
See _Additional resources_ for the list of `sprig` library functions.
12+
13+
The following content describes the additional template functions for the `cluster-compare` plugin.
14+
15+
.Additional cluster-compare template functions
16+
[options="header"]
17+
[cols="2a,3a"]
18+
|====
19+
| Function | Description
20+
21+
|`fromJson`
22+
|Parses the incoming string as a structured JSON object.
23+
24+
|`fromJsonArray`
25+
|Parses the incoming string as a structured JSON array.
26+
27+
|`fromYaml`
28+
|Parses the incoming string as a structured YAML object.
29+
30+
|`fromYamlArray`
31+
|Parses the incoming string as a structured YAML array.
32+
33+
|`toJson`
34+
|Renders incoming data as JSON while preserving object types.
35+
36+
|`toToml`
37+
|Parses the incoming string as structured TOML data.
38+
39+
|`toYaml`
40+
|Renders incoming data as YAML while preserving object types.
41+
42+
|====

Diff for: scalability_and_performance/cluster-compare/creating-a-reference-configuration.adoc

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ include::modules/cluster-compare-template-groupings.adoc[leveloffset=+1]
1414

1515
include::modules/cluster-compare-templating.adoc[leveloffset=+1]
1616

17+
include::modules/cluster-compare-templating-reference.adoc[leveloffset=+2]
18+
19+
[role="_additional-resources"]
20+
.Additional resources
21+
22+
* link:https://masterminds.github.io/sprig/[Sprig Function Documentation]
23+
1724
include::modules/cluster-compare-exclude-metadata.adoc[leveloffset=+1]
1825

1926
include::modules/cluster-compare-configure-inline-diff.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)