35 Commits

Author SHA1 Message Date
Julia Mertz
287b4f13df fix: check worker_nodes in scheduling condition 2025-10-12 09:31:18 +02:00
Alexander Held
3abaae6fba feat(control-plane): add variable to toggle whether control-planes should be schedulable 2025-09-17 10:47:49 +02:00
Marcel Richter
da9fbad6ff feat: enable load balancer provisioning on control plane nodes when no workers exist
Add conditional nodeLabels configuration to remove the
exclude-from-external-load-balancers
label from control plane nodes when worker_count <= 0. This allows
control plane nodes to receive external load balancer traffic in
single-node or control-plane-only clusters while maintaining standard
separation for multi-node clusters.

Fixes: #241

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 23:53:38 +02:00
Marcel Richter
c6f593cb24 refactor(talos): use heredoc for hcloud-secret inline manifest 2025-06-04 21:06:02 +02:00
Marcel Richter
058a09d6cc fix(talos): handle zero control plane and worker counts
add dummy control plane and worker entries to the `controlplane_yaml`
and `worker_yaml` locals when their respective counts are zero. this
prevents errors when generating the talos configuration and ensures
that the module functions correctly even when no control planes or
workers are explicitly defined.  the dummy entries use predictable
fallback IP addresses and are included in the final config patches.
2025-04-07 23:13:51 +02:00
Sammy Etur
782b844c0e feat(talos): add extraManifests usage via user variable 2024-12-22 11:48:05 +01:00
Marcel Richter
6a8852b5f9 chore(deps): talos-cloud-controller-manager upgrade to v1.6.0 2024-06-06 16:44:38 +02:00
Marcel Richter
e3358ad1b7 feat(talos): Possibility to disable coreDNS in talos 2024-06-06 16:44:06 +02:00
Marcel Richter
5f0d39de84 feat(talos): Add enable_alias_ip to. Currently with limitations. 2024-06-01 19:43:49 +02:00
Marcel Richter
5a0afb43f4 Revert "fix(talos): disable forwardKubeDNSToHost until talos 1.7.3"
This reverts commit 6442494c91.
2024-05-30 14:49:31 +02:00
Marcel Richter
8ec39b14e7 fix(talos): Add some required kubespan parameters
Unfortunately, it still does not work..
2024-05-28 19:09:48 +02:00
Marcel Richter
01c05019cc feat(talos): Apparently the explicit interface configuration is no longer needed 2024-05-28 19:09:48 +02:00
Marcel Richter
6442494c91 fix(talos): disable forwardKubeDNSToHost until talos 1.7.3
Refs: https://github.com/siderolabs/talos/issues/8763
2024-05-28 19:09:48 +02:00
Marcel Richter
5c4e0843ae feat(talos): Use hostDNS
enable features:
- forwardKubeDNSToHost and resolveMemberNames
- Remove clusterDNS
2024-05-28 00:04:19 +02:00
Marcel Richter
5f920408f8 feat(talos): enable features: hostDNS, forwardKubeDNSToHost and resolveMemberNames 2024-05-28 00:04:19 +02:00
Marcel Richter
05ec67d8b1 fix(talos): Explicitly specify the siderolabs/installer version
Because of: https://github.com/siderolabs/terraform-provider-talos/issues/157#issuecomment-2047715631
2024-05-28 00:04:19 +02:00
Marcel Richter
b4538e8ec6 refactor(talos): Use names in patches instead of indexes
This is required to be able to select configs (patches) by name.

You can use `moved` blocks to migrate the servers:
e.g.:
```
moved {
  from = module.talos.hcloud_server.control_planes[0]
  to   = module.talos.hcloud_server.control_planes["control-plane-1"]
}
moved {
  from = module.talos.hcloud_server.workers[0]
  to   = module.talos.hcloud_server.workers["worker-1"]
}
```

BREAKING CHANGE: Use `moved` to migrate.
2024-05-23 00:34:14 +02:00
Marcel Richter
ba5e5847f8 feat(talos): Possibility to set additional sysctls 2024-05-22 15:01:41 +02:00
Marcel Richter
907cea2753 feat(talos): add kubelet_extra_args for customizable kubelet parameters
- Introduce a new variable `kubelet_extra_args` in `variables.tf` to allow
  additional kubelet arguments to be specified
- Modify `talos_patch_worker.tf` and `talos_patch_control_plane.tf` to merge
  the default kubelet arguments with any user-specified `kubelet_extra_args`
- This change enables more flexible kubelet configurations, which can be
  tailored to specific cluster requirements

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-04-09 17:25:53 +02:00
Marcel Richter
23d6ce476f feat(talos): add kernel modules configuration support
Introduced a new variable `kernel_modules_to_load` and updated `talos_patch_worker.tf` and `talos_patch_control_plane.tf` to support configuration of kernel modules.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-04-07 23:11:41 +02:00
Marcel Richter
d74196e837 feat(talos): add registries variable for mirror configuration
Added a new `registries` variable to `variables.tf` to allow configuration of registry mirrors in Talos deployments. This feature enables users to specify custom registry mirrors for container image downloads, enhancing flexibility and potential performance improvements in environments with specific network requirements or restrictions.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-04-03 23:58:39 +02:00
Marcel Richter
a7b77b892b feat(talos): add support for kube-apiserver extra args
Added a new variable `kube_api_extra_args` to pass additional arguments to the kube-apiserver.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-04-03 21:31:31 +02:00
Marcel Richter
dfe48dd9ec feat(terraform-cilium): enable prometheus integration for cilium
Enabled Prometheus metrics in Cilium configuration to prepare for kube-prometheus-stack integration. Updated README to reflect these changes.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-03-27 22:44:22 +01:00
Marcel Richter
fe2cfa3e46 feat(talos): add scheduler bind-address to control plane config
Added `bind-address` config for Kubernetes scheduler in the Talos control plane patch file to be able to monitor with prometheus.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-03-26 17:51:59 +01:00
Marcel Richter
b3656ee899 fix(talos): correct boolean value in kubelet args
Changed "rotate-server-certificates" from string to boolean in talos_patch_control_plane.tf. This ensures proper parsing by Terraform.

Signed-off-by: Marcel Richter <mail@mrclrchtr.de>
2024-03-26 11:46:38 +01:00
Marcel Richter
bbe4716667 feat(network): add KubeSpan feature toggle
Introduced `enable_kube_span` variable to toggle KubeSpan. Updated worker and control plane configurations to respect this setting.
2024-03-26 00:24:38 +01:00
Marcel Richter
cbfa8b3f03 feat(network): "add" private vip functionality
Prep for Talos PR 8493 integration with commented-out config for enhanced networking.

Refs: https://github.com/siderolabs/talos/pull/8493
2024-03-26 00:24:38 +01:00
Marcel Richter
aecbaeafec fix(terraform): ensure minimum count of resources for debuggability
Adjusted resource and data configurations to ensure at least one instance is created, even when count is set to 0. This change includes updates to control plane and worker machine configurations, primary IP assignments, and private IPv4 lists.

This adjustment is crucial for maintaining debuggability and consistent infrastructure provisioning.
2024-03-26 00:24:38 +01:00
Marcel Richter
e9718b919c feat(kubernetes): make cluster domain configurable
Made the cluster domain configurable by introducing a new variable `cluster_domain` and updating references in Terraform configuration files. This change allows for dynamic domain naming, enhancing flexibility for different deployment scenarios.
2024-03-22 01:40:10 +01:00
Marcel Richter
628bef369b feat(network): support existing floating IPs for control plane
Introduced the ability to use an existing floating IP for the control plane by adding a `floating_ip_id` variable.
2024-03-21 21:10:31 +01:00
Marcel Richter
cf505c3adc feat(terraform): use DaemonSet modus for talos-cloud-controller-manager 2024-03-21 20:36:00 +01:00
Marcel Richter
4b7fb7f2a9 feat(network): add support for optional IPv6 configuration
IPv4/IPv6 dual-stack is actually not supported, it keeps being an IPv4 single stack. PRs welcome!

Added the `enable_ipv6` variable to conditionally enable IPv6 addresses for servers. This update allows users to specify whether their infrastructure should support IPv6, making the setup more flexible for different network requirements. Additionally, updated resources and configurations to respect the `enable_ipv6` flag, including adjustments to server and network configurations to properly handle IPv6 addresses and subnets when enabled. This change enhances network configuration options, enabling users to opt for IPv6 support based on their specific needs or restrictions.

The update includes:
- A new variable `enable_ipv6` to toggle IPv6 support.
- Conditional logic in Terraform configurations to apply IPv6 settings.
- Adjustments to server provisioning scripts to enable or disable IPv6 based on the new variable.

This enhancement simplifies network configuration management in environments where IPv6 support is either required or needs to be explicitly disabled, providing greater flexibility in how infrastructure is deployed.
2024-03-20 17:03:14 +01:00
Marcel Richter
5a69725b98 feat(network): add floating IP support 2024-03-20 16:20:04 +01:00
Marcel Richter
b61f4bfbb8 feat: update terraform configuration for improved flexibility 2024-03-19 05:06:10 +01:00
Marcel Richter
15dcd3e3d4 refactor: replace yaml.tpl files with yamlencode code 2024-03-18 23:55:43 +01:00