Skip to content

Commit

Permalink
docs: document omitting DiskPartition size
Browse files Browse the repository at this point in the history
Documents the effect of omitting the size of a DiskPartition.

Closes siderolabs#3014

Signed-off-by: Brandon McNama <brandonmcnama@outlook.com>
  • Loading branch information
Brandon McNama authored and talos-bot committed Jan 4, 2021
1 parent 5325a66 commit d455f91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
5 changes: 3 additions & 2 deletions pkg/machinery/config/types/v1alpha1/v1alpha1_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/v0.6/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
9 changes: 2 additions & 7 deletions website/content/docs/v0.7/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>0</code> will cause the parititon to take up the rest of the disk.
# # Human readable representation.
# size: 100 MB
Expand Down Expand Up @@ -2451,8 +2451,7 @@ Appears in:
</div>
<div class="dt">
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:
Expand Down Expand Up @@ -3732,7 +3731,3 @@ Skip TLS server certificate verification (not recommended).
</div>
<hr />
6 changes: 3 additions & 3 deletions website/content/docs/v0.8/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2505,7 +2505,7 @@ Appears in:
</div>
<div class="dt">
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.
Expand Down

0 comments on commit d455f91

Please sign in to comment.