feat(bootstrap): static ips and default ntp/dns servers (#1618)
This commit is contained in:
1 parent
48a7a16f90
commit
e5a7ba8da8
7 files changed
+32
-47
No files matched your search
@@ -12,7 +12,7 @@ cgroup:
|
||||
hostRoot: /sys/fs/cgroup
|
||||
cluster:
|
||||
id: 1
|
||||
name: "#{ bootstrap_cluster_name|default('home-kubernetes', true) }#"
|
||||
name: "#{ bootstrap_cluster_name | default('home-kubernetes', true) }#"
|
||||
cni:
|
||||
exclusive: false
|
||||
# NOTE: devices might need to be set if you have more than one active NIC on your hosts
|
||||
@@ -43,7 +43,7 @@ l2announcements:
|
||||
#% endif %#
|
||||
loadBalancer:
|
||||
algorithm: maglev
|
||||
mode: "#{ bootstrap_loadbalancer_mode|default('dsr', true) }#"
|
||||
mode: "#{ bootstrap_loadbalancer_mode | default('dsr', true) }#"
|
||||
localRedirectPolicy: true
|
||||
operator:
|
||||
replicas: 1
|
||||
|
||||
@@ -16,7 +16,7 @@ spec:
|
||||
#% for item in bootstrap_bgp.peers %#
|
||||
- peerAddress: "#{ item }#/32"
|
||||
peerASN: #{ bootstrap_bgp.peer_asn }#
|
||||
peerPort: #{ bootstrap_bgp.peer_port | default(179) }#
|
||||
peerPort: #{ bootstrap_bgp.peer_port | default(179, true) }#
|
||||
#% endfor %#
|
||||
#% else %#
|
||||
#% if bootstrap_node_default_gateway %#
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
machine:
|
||||
network:
|
||||
nameservers:
|
||||
#% for item in bootstrap_dns_servers | default(["1.1.1.1","1.0.0.1"], true) %#
|
||||
- #{ item }#
|
||||
#% endfor %#
|
||||
@@ -0,0 +1,7 @@
|
||||
machine:
|
||||
time:
|
||||
disabled: false
|
||||
servers:
|
||||
#% for item in bootstrap_ntp_servers | default(["time.cloudflare.com"], true) %#
|
||||
- #{ item }#
|
||||
#% endfor %#
|
||||
@@ -36,9 +36,9 @@ nodes:
|
||||
#% if bootstrap_secureboot.enabled %#
|
||||
machineSpec:
|
||||
secureboot: true
|
||||
talosImageURL: factory.talos.dev/installer-secureboot/#{ item.schematic_id | default(bootstrap_schematic_id) }#
|
||||
talosImageURL: factory.talos.dev/installer-secureboot/#{ item.schematic_id | default(bootstrap_schematic_id, true) }#
|
||||
#% else %#
|
||||
talosImageURL: factory.talos.dev/installer/#{ item.schematic_id | default(bootstrap_schematic_id) }#
|
||||
talosImageURL: factory.talos.dev/installer/#{ item.schematic_id | default(bootstrap_schematic_id, true) }#
|
||||
#% endif %#
|
||||
controlPlane: #{ (item.controller) | string | lower }#
|
||||
networkInterfaces:
|
||||
@@ -49,7 +49,7 @@ nodes:
|
||||
- vlanId: #{ bootstrap_vlan }#
|
||||
addresses:
|
||||
- "#{ item.address }#/#{ bootstrap_node_network.split('/') | last }#"
|
||||
mtu: #{ item.mtu | default(1500) }#
|
||||
mtu: #{ item.mtu | default(1500, true) }#
|
||||
routes:
|
||||
- network: 0.0.0.0/0
|
||||
#% if bootstrap_node_default_gateway %#
|
||||
@@ -62,7 +62,6 @@ nodes:
|
||||
ip: "#{ bootstrap_controller_vip }#"
|
||||
#% endif %#
|
||||
#% else %#
|
||||
#% if item.address %#
|
||||
dhcp: false
|
||||
addresses:
|
||||
- "#{ item.address }#/#{ bootstrap_node_network.split('/') | last }#"
|
||||
@@ -73,10 +72,7 @@ nodes:
|
||||
#% else %#
|
||||
gateway: "#{ bootstrap_node_network | nthhost(1) }#"
|
||||
#% endif %#
|
||||
#% else %#
|
||||
dhcp: true
|
||||
#% endif %#
|
||||
mtu: #{ item.mtu | default(1500) }#
|
||||
mtu: #{ item.mtu | default(1500, true) }#
|
||||
#% if item.controller %#
|
||||
vip:
|
||||
ip: "#{ bootstrap_controller_vip }#"
|
||||
@@ -116,27 +112,6 @@ nodes:
|
||||
|
||||
# Global patches
|
||||
patches:
|
||||
#% if bootstrap_dns_servers | length %#
|
||||
- # Force nameserver
|
||||
|-
|
||||
machine:
|
||||
network:
|
||||
nameservers:
|
||||
#% for item in bootstrap_dns_servers %#
|
||||
- #{ item }#
|
||||
#% endfor %#
|
||||
#% endif %#
|
||||
#% if bootstrap_ntp_servers | length %#
|
||||
- # Configure NTP
|
||||
|-
|
||||
machine:
|
||||
time:
|
||||
disabled: false
|
||||
servers:
|
||||
#% for item in bootstrap_ntp_servers %#
|
||||
- #{ item }#
|
||||
#% endfor %#
|
||||
#% endif %#
|
||||
#% if bootstrap_secureboot.enabled and bootstrap_secureboot.encrypt_disk_with_tpm %#
|
||||
- # Encrypt system disk with TPM
|
||||
|-
|
||||
|
||||
@@ -12,7 +12,7 @@ spec:
|
||||
name: github-deploy-key
|
||||
#% endif %#
|
||||
ref:
|
||||
branch: "#{ bootstrap_github_branch|default('main', true) }#"
|
||||
branch: "#{ bootstrap_github_branch | default('main', true) }#"
|
||||
ignore: |
|
||||
# exclude all
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user