File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
docs/book/src/tasks/experimental-features/cluster-class Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -643,7 +643,12 @@ Of course the same is possible by adding a boolean variable to a configuration o
643
643
644
644
Builtin variables can be leveraged to apply a patch only for a specific Kubernetes version.
645
645
` ` ` yaml
646
- enabledIf: "{{ if eq "v1.21.1" .builtin.controlPlane.version }}true{{end}}"
646
+ enabledIf: '{{ semverCompare "1.21.1" .builtin.controlPlane.version }}'
647
+ ` ` `
648
+
649
+ With `semverCompare` and `coalesce` a feature can be enabled in newer versions of Kubernetes for both KubeadmConfigTemplate and KubeadmControlPlane.
650
+ ` ` ` yaml
651
+ enabledIf: '{{ semverCompare "^1.22.0" (coalesce .builtin.controlPlane.version .builtin.machineDeployment.version )}}'
647
652
` ` `
648
653
649
654
<!-- links -->
You can’t perform that action at this time.
0 commit comments