Skip to content

Commit

Permalink
Merge pull request #759 from apedriza/update_docs_about_cluster_persi…
Browse files Browse the repository at this point in the history
…stance

Add docs about Cluster persistance
  • Loading branch information
makhov authored Oct 22, 2024
2 parents b20b53c + 73faa7e commit deaeb86
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion api/k0smotron.io/v1beta1/k0smotroncluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ClusterSpec struct {
//+kubebuilder:default={"type":"ClusterIP","apiPort":30443,"konnectivityPort":30132}
Service ServiceSpec `json:"service,omitempty"`
// Persistence defines the persistence configuration. If empty k0smotron
// will use emptyDir as a volume.
// will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
//+kubebuilder:validation:Optional
Persistence PersistenceSpec `json:"persistence,omitempty"`
// KineDataSourceURL defines the kine datasource URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3446,7 +3446,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3504,7 +3504,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3446,7 +3446,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3504,7 +3504,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/k0smotron.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,7 @@ spec:
persistence:
description: |-
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence
properties:
autoDeletePVCs:
default: false
Expand Down
8 changes: 8 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ spec:
For full reference of the fields check out the [reference docs](resource-reference.md#cluster).
## Persistence
K0smotron persists data related to each Cluster. Specifically, it persists the `/var/lib/k0s` directory of the k0s controller which is the default data directory used by k0s.

The `/var/lib/k0s` directory contains essential data for the operation of the k0s controller, but its growth over time is primarily driven by the addition of small [manifest](https://docs.k0sproject.io/stable/manifests/) files. Since these manifests are lightweight and in text format, the directory tends to grow gradually and not excessively. Typically, 250 MB of space is sufficient to handle its growth, as the main additions are these small manifests, keeping the overall size manageable.

The type of persistence used for this can be configurable via `spec.persistence`. For more information, check out the [reference docs](resource-reference.md/#clusterspecpersistence) on Cluster persistence.

## K0s configuration

K0smotron allows you to configure k0s via `spec.k0sConfig` field. If empty, the default configuration will be used.
Expand Down
12 changes: 6 additions & 6 deletions docs/resource-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,7 @@ https://kubernetes.io/docs/concepts/storage/volumes<br/>
<td>object</td>
<td>
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.<br/>
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -10049,7 +10049,7 @@ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.<br/>


Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence

<table>
<thead>
Expand Down Expand Up @@ -11290,7 +11290,7 @@ https://kubernetes.io/docs/concepts/storage/volumes<br/>
<td>object</td>
<td>
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.<br/>
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -18474,7 +18474,7 @@ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.<br/>


Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence

<table>
<thead>
Expand Down Expand Up @@ -35630,7 +35630,7 @@ https://kubernetes.io/docs/concepts/storage/volumes<br/>
<td>object</td>
<td>
Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.<br/>
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -42814,7 +42814,7 @@ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.<br/>


Persistence defines the persistence configuration. If empty k0smotron
will use emptyDir as a volume.
will use emptyDir as a volume. See https://docs.k0smotron.io/stable/configuration/#persistence

<table>
<thead>
Expand Down

0 comments on commit deaeb86

Please sign in to comment.