Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about Cluster persistance #759

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2741,7 +2741,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 @@ -9925,7 +9925,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
jnummelin marked this conversation as resolved.
Show resolved Hide resolved

<table>
<thead>
Expand Down Expand Up @@ -11166,7 +11166,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 @@ -18350,7 +18350,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 @@ -35506,7 +35506,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 @@ -42690,7 +42690,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
Loading