Skip to content

Commit

Permalink
Merge pull request #6296 from sbueringer/pr-improve-write-clusterclas…
Browse files Browse the repository at this point in the history
…s-doc

📖 book: clarify usage of builtin variables in enabledIf
  • Loading branch information
k8s-ci-robot authored Mar 11, 2022
2 parents 5fea047 + 608ebb9 commit 83bf566
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,16 @@ With `semverCompare` and `coalesce` a feature can be enabled in newer versions o
enabledIf: '{{ semverCompare "^1.22.0" (coalesce .builtin.controlPlane.version .builtin.machineDeployment.version )}}'
```

<aside class="note">

<h1>Builtin Variables</h1>

Please be aware that while you can use builtin variables, if you use for example a MachineDeployment-specific variable this
can mean that patches are only applied to some MachineDeployments. `enabledIf` is evaluated for each template that should be patched
individually.

</aside>

<!-- links -->
[Changing a ClusterClass]: ./change-clusterclass.md
[clusterctl alpha topology plan]: ../../../clusterctl/commands/alpha-topology-plan.md

0 comments on commit 83bf566

Please sign in to comment.