From 834b4f94270ee7cb0ee2bcaf416470d1ad51ada2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Pulverin?= Date: Fri, 8 Dec 2023 16:39:40 +0100 Subject: [PATCH] Fix doc configuration spec.workerProfiles examples misplaced MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exemples related to spec.workerProfiles are in spec.featureGates section which make them impossible to find. Signed-off-by: Sébastien Pulverin (cherry picked from commit 61959b638ede3f21a9cb749c57701a02db285dd2) --- docs/configuration.md | 86 ++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 30869eb56f8d..ebe16a22738c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -331,6 +331,46 @@ Note that there are several fields that cannot be overridden: [kubelet-config]: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ +#### Configuration examples + +##### Custom volumePluginDir + +```yaml +spec: + workerProfiles: + - name: custom-pluginDir + values: + volumePluginDir: /var/libexec/k0s/kubelet-plugins/volume/exec +``` + +##### Eviction Policy + +```yaml +spec: + workerProfiles: + - name: custom-eviction + values: + evictionHard: + memory.available: "500Mi" + nodefs.available: "1Gi" + imagefs.available: "100Gi" + evictionMinimumReclaim: + memory.available: "0Mi" + nodefs.available: "500Mi" + imagefs.available: "2Gi" +``` + +##### Unsafe Sysctls + +```yaml +spec: + workerProfiles: + - name: custom-eviction + values: + allowedUnsafeSysctls: + - fs.inotify.max_user_instances +``` + ### `spec.featureGates` Available components are: @@ -345,7 +385,9 @@ If `components` are omitted, propagates to all kube components. Modifies extraArgs. -#### Example +#### Examples + +##### Generic feature gates example ```yaml spec: @@ -359,7 +401,7 @@ spec: enabled: false ``` -#### Kubelet feature gates example +##### Kubelet feature gates example The below is an example of a k0s config with feature gates enabled: @@ -376,46 +418,6 @@ spec: enabled: false ``` -#### Configuration examples - -##### Custom volumePluginDir - -```yaml -spec: - workerProfiles: - - name: custom-pluginDir - values: - volumePluginDir: /var/libexec/k0s/kubelet-plugins/volume/exec -``` - -##### Eviction Policy - -```yaml -spec: - workerProfiles: - - name: custom-eviction - values: - evictionHard: - memory.available: "500Mi" - nodefs.available: "1Gi" - imagefs.available: "100Gi" - evictionMinimumReclaim: - memory.available: "0Mi" - nodefs.available: "500Mi" - imagefs.available: "2Gi" -``` - -##### Unsafe Sysctls - -```yaml -spec: - workerProfiles: - - name: custom-eviction - values: - allowedUnsafeSysctls: - - fs.inotify.max_user_instances -``` - ### `spec.images` Nodes under the `images` key all have the same basic structure: