From d455f917fb7b66bdb802ab8d50b23bc4f95280a8 Mon Sep 17 00:00:00 2001 From: Brandon McNama Date: Sun, 3 Jan 2021 00:19:32 -0500 Subject: [PATCH] docs: document omitting DiskPartition size Documents the effect of omitting the size of a DiskPartition. Closes talos-systems/talos#3014 Signed-off-by: Brandon McNama --- pkg/machinery/config/types/v1alpha1/v1alpha1_types.go | 5 +++-- .../config/types/v1alpha1/v1alpha1_types_doc.go | 4 ++-- website/content/docs/v0.6/Reference/configuration.md | 2 +- website/content/docs/v0.7/Reference/configuration.md | 9 ++------- website/content/docs/v0.8/Reference/configuration.md | 6 +++--- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go b/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go index d0d123eaaa..0bc0e480e1 100644 --- a/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go +++ b/pkg/machinery/config/types/v1alpha1/v1alpha1_types.go @@ -986,8 +986,9 @@ func (ds *DiskSize) UnmarshalYAML(unmarshal func(interface{}) error) error { // DiskPartition represents the options for a disk partition. type DiskPartition struct { - // description: | - // This size of partition: either bytes or human readable representation. + // description: > + // The size of partition: either bytes or human readable representation. If `size:` + // is omitted, the partition is sized to occupy the full disk. // examples: // - name: Human readable representation. // value: DiskSize(100000000) diff --git a/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go b/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go index 99b6a17d72..4d19d4818b 100644 --- a/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go +++ b/pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go @@ -873,8 +873,8 @@ func init() { DiskPartitionDoc.Fields[0].Name = "size" DiskPartitionDoc.Fields[0].Type = "DiskSize" DiskPartitionDoc.Fields[0].Note = "" - DiskPartitionDoc.Fields[0].Description = "This size of partition: either bytes or human readable representation." - DiskPartitionDoc.Fields[0].Comments[encoder.LineComment] = "This size of partition: either bytes or human readable representation." + DiskPartitionDoc.Fields[0].Description = "The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk." + DiskPartitionDoc.Fields[0].Comments[encoder.LineComment] = "The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk." DiskPartitionDoc.Fields[0].AddExample("Human readable representation.", DiskSize(100000000)) diff --git a/website/content/docs/v0.6/Reference/configuration.md b/website/content/docs/v0.6/Reference/configuration.md index 65853757e3..89f31ced7b 100644 --- a/website/content/docs/v0.6/Reference/configuration.md +++ b/website/content/docs/v0.6/Reference/configuration.md @@ -1161,7 +1161,7 @@ Type: `array` #### size -This size of the partition in bytes. +The size of the partition in bytes. If `size:` is omitted, the partition is sized to occupy the full disk. Type: `uint` diff --git a/website/content/docs/v0.7/Reference/configuration.md b/website/content/docs/v0.7/Reference/configuration.md index 1fecd06912..fb7bc56db3 100644 --- a/website/content/docs/v0.7/Reference/configuration.md +++ b/website/content/docs/v0.7/Reference/configuration.md @@ -394,7 +394,7 @@ disks: partitions: - mountpoint: /var/mnt/extra # Where to mount the partition. - # # This size of partition: either bytes or human readable representation. + # # The size of partition: either bytes or human readable representation. Setting this to 0 will cause the parititon to take up the rest of the disk. # # Human readable representation. # size: 100 MB @@ -2451,8 +2451,7 @@ Appears in:
-This size of partition: either bytes or human readable representation. - +The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. Examples: @@ -3732,7 +3731,3 @@ Skip TLS server certificate verification (not recommended).

- - - - diff --git a/website/content/docs/v0.8/Reference/configuration.md b/website/content/docs/v0.8/Reference/configuration.md index 8cde124713..dc5ab07faa 100644 --- a/website/content/docs/v0.8/Reference/configuration.md +++ b/website/content/docs/v0.8/Reference/configuration.md @@ -398,7 +398,7 @@ disks: partitions: - mountpoint: /var/mnt/extra # Where to mount the partition. - # # This size of partition: either bytes or human readable representation. + # # The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. # # Human readable representation. # size: 100 MB @@ -2446,7 +2446,7 @@ Appears in: partitions: - mountpoint: /var/mnt/extra # Where to mount the partition. - # # This size of partition: either bytes or human readable representation. + # # The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk. # # Human readable representation. # size: 100 MB @@ -2505,7 +2505,7 @@ Appears in:
-This size of partition: either bytes or human readable representation. +The size of partition: either bytes or human readable representation. If `size:` is omitted, the partition is sized to occupy the full disk.