Skip to content

Commit

Permalink
fix(talos): do not render worker config when no workers
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Jan 30, 2024
1 parent bc9f676 commit a2ce911
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions bootstrap/templates/kubernetes/talos/talconfig.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ clusterSvcNets:
- "{{ cluster.service_network.split(',')[0] }}"
additionalApiServerCertSans: &sans
- "{{ cluster.endpoint_vip }}"
- 127.0.0.1
- 127.0.0.1 # KubePrism
{% for item in cluster.tls_sans %}
- "{{ item }}"
{% endfor %}
Expand All @@ -31,11 +31,7 @@ nodes:
installDiskSelector:
serial: "{{ item.talos_disk_device }}"
{% endif %}
{% if item.controller %}
controlPlane: true
{% else %}
controlPlane: false
{% endif %}
controlPlane: {{ (item.controller) | string | lower }}
networkInterfaces:
- interface: eth0
dhcp: false
Expand All @@ -49,9 +45,6 @@ nodes:
vip:
ip: "{{ cluster.endpoint_vip }}"
{% endif %}
{% if item.talos_node_config %}
{{ item.talos_node_config | indent(4, false) }}
{% endif %}
{% endfor %}

controlPlane:
Expand Down Expand Up @@ -173,6 +166,7 @@ controlPlane:
allowedKubernetesNamespaces:
- system-upgrade
{% if cluster.nodes.inventory | selectattr('controller', 'equalto', False) | list | length %}
worker:
{% if cluster.nodes.talos.schematics.enabled %}
schematic:
Expand All @@ -188,3 +182,4 @@ worker:
- *nameserverPatch
- *ntpPatch
- *sysctlPatch
{% endif %}

0 comments on commit a2ce911

Please sign in to comment.