feat: refactor config file (#1267)
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
e4427a8325
commit
889ca07692
114 files changed
+721
-1042
No files matched your search
@@ -1 +1 @@
|
||||
main = lambda data: data.get("bootstrap_distribution") in ['talos']
|
||||
main = lambda data: data.get("distribution") in ['talos']
|
||||
@@ -6,15 +6,15 @@ talosVersion: v1.6.3
|
||||
kubernetesVersion: v1.29.1
|
||||
|
||||
clusterName: &cluster home-kubernetes
|
||||
endpoint: https://#{ bootstrap_kube_api_addr }#:6443
|
||||
endpoint: https://#{ cluster.endpoint_vip }#:6443
|
||||
clusterPodNets:
|
||||
- "#{ bootstrap_cluster_cidr.split(',')[0] }#"
|
||||
- "#{ cluster.pod_network.split(',')[0] }#"
|
||||
clusterSvcNets:
|
||||
- "#{ bootstrap_service_cidr.split(',')[0] }#"
|
||||
- "#{ cluster.service_network.split(',')[0] }#"
|
||||
additionalApiServerCertSans: &sans
|
||||
- "#{ bootstrap_kube_api_addr }#"
|
||||
- "#{ cluster.endpoint_vip }#"
|
||||
- 127.0.0.1
|
||||
#% for item in bootstrap_kube_additional_tls_sans %#
|
||||
#% for item in cluster.tls_sans %#
|
||||
- "#{ item }#"
|
||||
#% endfor %#
|
||||
additionalMachineCertSans: *sans
|
||||
@@ -22,47 +22,33 @@ cniConfig:
|
||||
name: none
|
||||
|
||||
nodes:
|
||||
#% for item in bootstrap_nodes.master %#
|
||||
#% for item in cluster.nodes.inventory %#
|
||||
- hostname: "#{ item.name }#"
|
||||
ipAddress: "#{ item.address }#"
|
||||
#% if item.talos.disk_device.startswith('/') %#
|
||||
installDisk: "#{ item.talos.disk_device }#"
|
||||
#% if item.talos_disk_device.startswith('/') %#
|
||||
installDisk: "#{ item.talos_disk_device }#"
|
||||
#% else %#
|
||||
installDiskSelector:
|
||||
serial: "#{ item.talos.disk_device }#"
|
||||
serial: "#{ item.talos_disk_device }#"
|
||||
#% endif %#
|
||||
#% if item.controller %#
|
||||
controlPlane: true
|
||||
networkInterfaces:
|
||||
- interface: eth0
|
||||
dhcp: false
|
||||
addresses:
|
||||
- "#{ item.address }#/#{ bootstrap_node_cidr.split('/') | last }#"
|
||||
mtu: 1500
|
||||
routes:
|
||||
- network: 0.0.0.0/0
|
||||
gateway: "#{ bootstrap_node_cidr | nthhost(1) }#"
|
||||
vip:
|
||||
ip: "#{ bootstrap_kube_api_addr }#"
|
||||
#% endfor %#
|
||||
#% for item in bootstrap_nodes.worker %#
|
||||
- hostname: "#{ item.name }#"
|
||||
ipAddress: "#{ item.address }#"
|
||||
#% if item.talos.disk_device.startswith('/') %#
|
||||
installDisk: "#{ item.talos.disk_device }#"
|
||||
#% else %#
|
||||
installDiskSelector:
|
||||
serial: "#{ item.talos.disk_device }#"
|
||||
#% endif %#
|
||||
controlPlane: false
|
||||
#% endif %#
|
||||
networkInterfaces:
|
||||
- interface: eth0
|
||||
dhcp: false
|
||||
addresses:
|
||||
- "#{ item.address }#/#{ bootstrap_node_cidr.split('/') | last }#"
|
||||
- "#{ item.address }#/#{ cluster.nodes.host_network.split('/') | last }#"
|
||||
mtu: 1500
|
||||
routes:
|
||||
- network: 0.0.0.0/0
|
||||
gateway: "#{ bootstrap_node_cidr | nthhost(1) }#"
|
||||
gateway: "#{ cluster.nodes.host_network | nthhost(1) }#"
|
||||
#% if item.controller %#
|
||||
vip:
|
||||
ip: "#{ cluster.endpoint_vip }#"
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
|
||||
controlPlane:
|
||||
@@ -106,7 +92,7 @@ controlPlane:
|
||||
rotate-server-certificates: true
|
||||
nodeIP:
|
||||
validSubnets:
|
||||
- "#{ bootstrap_node_cidr }#"
|
||||
- "#{ cluster.nodes.host_network }#"
|
||||
|
||||
# Enable KubePrism
|
||||
- &kubePrismPatch |-
|
||||
@@ -121,7 +107,9 @@ controlPlane:
|
||||
machine:
|
||||
network:
|
||||
nameservers:
|
||||
- "#{ bootstrap_dns_server }#"
|
||||
#% for item in cluster.nodes.dns_servers %#
|
||||
- #{ item }#
|
||||
#% endfor %#
|
||||
|
||||
# Configure NTP
|
||||
- &ntpPatch |-
|
||||
@@ -159,7 +147,7 @@ controlPlane:
|
||||
extraArgs:
|
||||
listen-metrics-urls: http://0.0.0.0:2381
|
||||
advertisedSubnets:
|
||||
- "#{ bootstrap_node_cidr }#"
|
||||
- "#{ cluster.nodes.host_network }#"
|
||||
|
||||
# Disable default API server admission plugins.
|
||||
- |-
|
||||
|
||||
Reference in new issue
Block a user