mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
feat(tofu): better way of supplying apiServer arguments
This commit is contained in:
@@ -36,7 +36,7 @@ data "talos_machine_configuration" "this" {
|
|||||||
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
|
templatefile("${path.module}/machine-config/control-plane.yaml.tftpl", {
|
||||||
cilium_values = file("${path.root}/${var.cilium.values_path}")
|
cilium_values = file("${path.root}/${var.cilium.values_path}")
|
||||||
cilium_install = file("${path.root}/${var.cilium.install_manifest_path}")
|
cilium_install = file("${path.root}/${var.cilium.install_manifest_path}")
|
||||||
base_domain = var.cluster.base_domain
|
api_server = var.cluster.api_server
|
||||||
}) : ""
|
}) : ""
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,4 +83,4 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: values
|
- name: values
|
||||||
configMap:
|
configMap:
|
||||||
name: cilium-values
|
name: cilium-values
|
||||||
|
|||||||
@@ -7,13 +7,7 @@ machine:
|
|||||||
cluster:
|
cluster:
|
||||||
allowSchedulingOnControlPlanes: true
|
allowSchedulingOnControlPlanes: true
|
||||||
apiServer:
|
apiServer:
|
||||||
extraArgs:
|
${indent(4, api_server)}
|
||||||
oidc-issuer-url: https://authelia.${base_domain}
|
|
||||||
oidc-client-id: kubectl
|
|
||||||
oidc-username-claim: preferred_username
|
|
||||||
oidc-username-prefix: 'authelia:'
|
|
||||||
oidc-groups-claim: groups
|
|
||||||
oidc-groups-prefix: 'authelia:'
|
|
||||||
network:
|
network:
|
||||||
cni:
|
cni:
|
||||||
name: none
|
name: none
|
||||||
|
|||||||
@@ -23,7 +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
|
||||||
base_domain = string
|
api_server = optional(string)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +48,6 @@ variable "cilium" {
|
|||||||
description = "Cilium configuration"
|
description = "Cilium configuration"
|
||||||
type = object({
|
type = object({
|
||||||
install_manifest_path = string
|
install_manifest_path = string
|
||||||
values_path = string
|
values_path = string
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,15 @@ talos_cluster_config = {
|
|||||||
talos_machine_config_version = "v1.9.2"
|
talos_machine_config_version = "v1.9.2"
|
||||||
proxmox_cluster = "homelab"
|
proxmox_cluster = "homelab"
|
||||||
kubernetes_version = "1.32.0" # renovate: github-releases=kubernetes/kubernetes
|
kubernetes_version = "1.32.0" # renovate: github-releases=kubernetes/kubernetes
|
||||||
base_domain = "stonegarden.dev"
|
api_server = <<-EOT
|
||||||
|
extraArgs:
|
||||||
|
oidc-issuer-url: "https://authelia.stonegarden.dev"
|
||||||
|
oidc-client-id: "kubectl"
|
||||||
|
oidc-username-claim: "preferred_username"
|
||||||
|
oidc-username-prefix: "authelia:"
|
||||||
|
oidc-groups-claim: "groups"
|
||||||
|
oidc-groups-prefix: "authelia:"
|
||||||
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
cilium_config = {
|
cilium_config = {
|
||||||
|
|||||||
@@ -39,7 +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
|
||||||
base_domain = string
|
api_server = optional(string)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user