From e5a36268b63e588ea6cd2439bf0de356ee07d752 Mon Sep 17 00:00:00 2001 From: Utku Ozdemir Date: Mon, 12 Jun 2023 15:29:00 +0200 Subject: [PATCH] docs: include `allowSchedulingOnControlPlanes` on `talosctl gen config` output Include a description and a commented-out example for the `cluster.allowSchedulingOnControlPlanes` field on `talosctl gen config ...` output. Closes siderolabs/talos#7313. Signed-off-by: Utku Ozdemir --- pkg/machinery/config/types/v1alpha1/v1alpha1_types.go | 2 ++ pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go | 2 ++ website/content/v1.5/reference/configuration.md | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go b/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go index 9bb5cb186..fc5522ef4 100644 --- a/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go +++ b/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go @@ -1051,6 +1051,8 @@ type ClusterConfig struct { // - yes // - false // - no + // examples: + // - value: true AllowSchedulingOnControlPlanes *bool `yaml:"allowSchedulingOnControlPlanes,omitempty"` } diff --git a/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go b/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go index c881122a5..2f5e02ce2 100644 --- a/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go +++ b/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go @@ -523,6 +523,8 @@ func init() { ClusterConfigDoc.Fields[24].Note = "" ClusterConfigDoc.Fields[24].Description = "Allows running workload on control-plane nodes." ClusterConfigDoc.Fields[24].Comments[encoder.LineComment] = "Allows running workload on control-plane nodes." + + ClusterConfigDoc.Fields[24].AddExample("", true) ClusterConfigDoc.Fields[24].Values = []string{ "true", "yes", diff --git a/website/content/v1.5/reference/configuration.md b/website/content/v1.5/reference/configuration.md index 90e8abe99..fb3c689e8 100644 --- a/website/content/v1.5/reference/configuration.md +++ b/website/content/v1.5/reference/configuration.md @@ -642,7 +642,9 @@ inlineManifests: adminKubeconfig: certLifetime: 1h0m0s # Admin kubeconfig certificate lifetime (default is 1 year). {{< /highlight >}} | | -|`allowSchedulingOnControlPlanes` |bool |Allows running workload on control-plane nodes. |`true`
`yes`
`false`
`no`
| +|`allowSchedulingOnControlPlanes` |bool |Allows running workload on control-plane nodes.
Show example(s){{< highlight yaml >}} +allowSchedulingOnControlPlanes: true +{{< /highlight >}}
|`true`
`yes`
`false`
`no`
|