diff --git a/docs/terraform.md b/docs/terraform.md index 9c192a11..4c411fff 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -90,7 +90,7 @@ | [additional\_k3s\_environment](#input\_additional\_k3s\_environment) | Additional environment variables for the k3s binary. See for example https://docs.k3s.io/advanced#configuring-an-http-proxy . | `map(any)` | `{}` | no | | [additional\_tls\_sans](#input\_additional\_tls\_sans) | Additional TLS SANs to allow connection to control-plane through it. | `list(string)` | `[]` | no | | [address\_for\_connectivity\_test](#input\_address\_for\_connectivity\_test) | Before installing k3s, we actually verify that there is internet connectivity. By default we ping 1.1.1.1, but if you use a proxy, you may simply want to ping that proxy instead (assuming that the proxy has its own checks for internet connectivity). | `string` | `"1.1.1.1"` | no | -| [agent\_nodepools](#input\_agent\_nodepools) | Number of agent nodes. |
list(object({| `[]` | no | +| [agent\_nodepools](#input\_agent\_nodepools) | Number of agent nodes. |
name = string
server_type = string
location = string
backups = optional(bool)
floating_ip = optional(bool)
labels = list(string)
taints = list(string)
count = number
longhorn_volume_size = optional(number)
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), [])
}))
list(object({| `[]` | no | | [allow\_scheduling\_on\_control\_plane](#input\_allow\_scheduling\_on\_control\_plane) | Whether to allow non-control-plane workloads to run on the control-plane nodes. | `bool` | `false` | no | | [automatically\_upgrade\_k3s](#input\_automatically\_upgrade\_k3s) | Whether to automatically upgrade k3s based on the selected channel. | `bool` | `true` | no | | [automatically\_upgrade\_os](#input\_automatically\_upgrade\_os) | Whether to enable or disable automatic os updates. Defaults to true. Should be disabled for single-node clusters | `bool` | `true` | no | @@ -119,7 +119,7 @@ | [cni\_plugin](#input\_cni\_plugin) | CNI plugin for k3s. | `string` | `"flannel"` | no | | [control\_plane\_lb\_enable\_public\_interface](#input\_control\_plane\_lb\_enable\_public\_interface) | Enable or disable public interface for the control plane load balancer . Defaults to true. | `bool` | `true` | no | | [control\_plane\_lb\_type](#input\_control\_plane\_lb\_type) | The type of load balancer to use for the control plane load balancer. Defaults to lb11, which is the cheapest one. | `string` | `"lb11"` | no | -| [control\_plane\_nodepools](#input\_control\_plane\_nodepools) | Number of control plane nodes. |
name = string
server_type = string
location = string
backups = optional(bool)
floating_ip = optional(bool)
labels = list(string)
taints = list(string)
count = number
longhorn_volume_size = optional(number)
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
}))
list(object({| `[]` | no | +| [control\_plane\_nodepools](#input\_control\_plane\_nodepools) | Number of control plane nodes. |
name = string
server_type = string
location = string
backups = optional(bool)
labels = list(string)
taints = list(string)
count = number
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), [])
}))
list(object({| `[]` | no | | [control\_planes\_custom\_config](#input\_control\_planes\_custom\_config) | Custom control plane configuration e.g to allow etcd monitoring. | `any` | `{}` | no | | [create\_kubeconfig](#input\_create\_kubeconfig) | Create the kubeconfig as a local file resource. Should be disabled for automatic runs. | `bool` | `true` | no | | [create\_kustomization](#input\_create\_kustomization) | Create the kustomization backup as a local file resource. Should be disabled for automatic runs. | `bool` | `true` | no | diff --git a/kube.tf.example b/kube.tf.example index eaed2a66..39f57a04 100644 --- a/kube.tf.example +++ b/kube.tf.example @@ -128,7 +128,7 @@ module "kube-hetzner" { count = 1 # swap_size = "2G" # remember to add the suffix, examples: 512M, 1G # zram_size = "2G" # remember to add the suffix, examples: 512M, 1G - # kubelet_args = ["kube-reserved=cpu=100m,memory=200Mi,ephemeral-storage=1Gi", "system-reserved=cpu=memory=200Mi"] + # kubelet_args = ["kube-reserved=cpu=250m,memory=1500Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"] # Enable automatic backups via Hetzner (default: false) # backups = true @@ -167,7 +167,7 @@ module "kube-hetzner" { count = 1 # swap_size = "2G" # remember to add the suffix, examples: 512M, 1G # zram_size = "2G" # remember to add the suffix, examples: 512M, 1G - # kubelet_args = ["kube-reserved=cpu=100m,memory=200Mi,ephemeral-storage=1Gi", "system-reserved=cpu=memory=200Mi"] + # kubelet_args = ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"] # Enable automatic backups via Hetzner (default: false) # backups = true diff --git a/variables.tf b/variables.tf index 1d99b6f8..83043caa 100644 --- a/variables.tf +++ b/variables.tf @@ -174,7 +174,7 @@ variable "control_plane_nodepools" { count = number swap_size = optional(string, "") zram_size = optional(string, "") - kubelet_args = optional(list(string), []) + kubelet_args = optional(list(string), ["kube-reserved=cpu=250m,memory=1500Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"]) })) default = [] validation { @@ -203,7 +203,7 @@ variable "agent_nodepools" { longhorn_volume_size = optional(number) swap_size = optional(string, "") zram_size = optional(string, "") - kubelet_args = optional(list(string), []) + kubelet_args = optional(list(string), ["kube-reserved=cpu=50m,memory=300Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"]) })) default = [] validation {
name = string
server_type = string
location = string
backups = optional(bool)
labels = list(string)
taints = list(string)
count = number
swap_size = optional(string, "")
zram_size = optional(string, "")
kubelet_args = optional(list(string), ["kube-reserved=cpu=250m,memory=1500Mi,ephemeral-storage=1Gi", "system-reserved=cpu=250m,memory=300Mi"])
}))