mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
refactor(tofu): template extraManifests in talos machine-config
This commit is contained in:
@@ -58,6 +58,7 @@ data "talos_machine_configuration" "this" {
|
|||||||
}), each.value.machine_type == "controlplane" ?
|
}), each.value.machine_type == "controlplane" ?
|
||||||
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
|
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
|
||||||
kubelet = var.cluster.kubelet
|
kubelet = var.cluster.kubelet
|
||||||
|
extra_manifests = jsonencode(var.cluster.extra_manifests)
|
||||||
api_server = var.cluster.api_server
|
api_server = var.cluster.api_server
|
||||||
inline_manifests = jsonencode(terraform_data.cilium_bootstrap_inline_manifests.output)
|
inline_manifests = jsonencode(terraform_data.cilium_bootstrap_inline_manifests.output)
|
||||||
}) : ""
|
}) : ""
|
||||||
|
|||||||
@@ -16,7 +16,5 @@ cluster:
|
|||||||
registries:
|
registries:
|
||||||
service:
|
service:
|
||||||
disabled: false
|
disabled: false
|
||||||
extraManifests:
|
extraManifests: ${extra_manifests}
|
||||||
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
|
|
||||||
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.1/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
|
|
||||||
inlineManifests: ${inline_manifests}
|
inlineManifests: ${inline_manifests}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ variable "cluster" {
|
|||||||
talos_machine_config_version = optional(string)
|
talos_machine_config_version = optional(string)
|
||||||
proxmox_cluster = string
|
proxmox_cluster = string
|
||||||
kubernetes_version = string
|
kubernetes_version = string
|
||||||
|
extra_manifests = optional(list(string))
|
||||||
kubelet = optional(string)
|
kubelet = optional(string)
|
||||||
api_server = optional(string)
|
api_server = optional(string)
|
||||||
cilium = object({
|
cilium = object({
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ talos_cluster_config = {
|
|||||||
bootstrap_manifest_path = "talos/inline-manifests/cilium-install.yaml"
|
bootstrap_manifest_path = "talos/inline-manifests/cilium-install.yaml"
|
||||||
values_file_path = "../../k8s/infra/network/cilium/values.yaml"
|
values_file_path = "../../k8s/infra/network/cilium/values.yaml"
|
||||||
}
|
}
|
||||||
kubelet = <<-EOT
|
extra_manifests = [
|
||||||
|
"https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml",
|
||||||
|
"https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.1/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml"
|
||||||
|
]
|
||||||
|
kubelet = <<-EOT
|
||||||
extraArgs:
|
extraArgs:
|
||||||
# Needed for Netbird agent https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls
|
# Needed for Netbird agent https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls
|
||||||
allowed-unsafe-sysctls: net.ipv4.conf.all.src_valid_mark
|
allowed-unsafe-sysctls: net.ipv4.conf.all.src_valid_mark
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ variable "talos_cluster_config" {
|
|||||||
talos_machine_config_version = optional(string)
|
talos_machine_config_version = optional(string)
|
||||||
proxmox_cluster = string
|
proxmox_cluster = string
|
||||||
kubernetes_version = string
|
kubernetes_version = string
|
||||||
|
extra_manifests = optional(list(string))
|
||||||
kubelet = optional(string)
|
kubelet = optional(string)
|
||||||
api_server = optional(string)
|
api_server = optional(string)
|
||||||
cilium = object({
|
cilium = object({
|
||||||
|
|||||||
Reference in New Issue
Block a user