feat(talos): Allow users to include talhelper patches (#1320)

* feat(talos): Allow users to include talhelper patches

* feat(talos): Add user talhelper patches to example config

* fix: Missing talos user_patches check on workers block
This commit is contained in:
Wasurerarenai authored and GitHub committed 2024-02-15 14:40:29 -05:00
1 parent 840506cea7
commit 025f5ddedf
2 files changed
+29

No files matched your search

@@ -75,6 +75,10 @@ nodes:
ip: "{{ cluster.endpoint_vip }}"
{% endif %}
{% endif %}
{% if distribution.talos.user_patches %}
patches:
- "@./patches/node_{{ item.name }}.yaml"
{% endif %}
{% endfor %}
patches:
@@ -183,6 +187,10 @@ patches:
- slot: 0
tpm: {}
{% endif %}
{% if distribution.talos.user_patches %}
# User specified global patches
- "@./patches/global.yaml"
{% endif %}
controlPlane:
patches:
@@ -224,3 +232,15 @@ controlPlane:
allowedKubernetesNamespaces:
- system-upgrade
{% if distribution.talos.user_patches %}
# User specified controlPlane patches
- "@./patches/controlPlane.yaml"
{% endif %}
{% if ( (distribution.talos.user_patches) and
(nodes.inventory | selectattr('controller', 'equalto', False) | list | length) ) %}
worker:
patches:
# User specified worker patches
- "@./patches/worker.yaml"
{% endif %}
+9
View File
@@ -40,6 +40,15 @@ distribution:
# # (Optional) Enable TPM-based disk encryption. Requires TPM 2.0
# # See: https://www.talos.dev/v1.6/talos-guides/install/bare-metal-platforms/secureboot/#disk-encryption-with-tpm
# encrypt_disk_with_tpm: true
# user_patches: true
# # (Optional) Add includes for user provided patches to generated talconfig.yaml.
# # See: https://github.com/budimanjojo/talhelper/blob/179ba9ed42f70069c7842109bea24f769f7af6eb/example/extraKernelArgs-patch.yaml
# # Patches are applied in this order. (global overrides cp/worker which overrides node-specific).
# # Create these files to allow talos:bootstrap-genconfig to complete (empty files are ok).
# # kubernetes/talos/patches/node_<name>.yaml # Patches for individual nodes
# # kubernetes/talos/patches/controlPlane.yaml # Patches for controlplane nodes
# # kubernetes/talos/patches/worker.yaml # Patches for worker nodes
# # kubernetes/talos/patches/global.yaml # Patches for ALL nodes
#
# (Required) Timezone is your IANA formatted timezone (e.g. America/New_York)