In this guide, we’ll patch the generated machine configuration.
talosctl gen config
but not all of them.
Configuration patching allows modifying machine configuration to fit it for the cluster or a specific machine.
Note: Talos 1.5+ supports multi-document machine configuration. JSON patches don’t support multi-document machine configuration, while strategic merge patches do.
cluster.network.podSubnets
and cluster.network.serviceSubnets
are overwritten on mergenetwork.interfaces
section is merged with the value in the machine config if there is a match on interface:
or deviceSelector:
keysnetwork.interfaces.vlans
section is merged with the value in the machine config if there is a match on the vlanId:
keycluster.apiServer.auditPolicy
value is replaced on mergeExtensionServiceConfig.configFiles
section is merged matching on mountPath
(replacing content
if matches)kind
, apiVersion
and name
for named documents)$patch: delete
syntax similar to the
Kubernetes
strategic merge patch.
For example, with configuration:
v1alpha1
configuration!) using this syntax:
SideroLinkConfig
and ExtensionServiceConfig
with name foo
from the configuration.
op
field that depends on the machine configuration contents: whether the path already exists or not.
For example, the strategic merge patch from the previous section can be written either as:
op
depends on whether the /machine/network/hostname
section exists already in the machine config or not.
192.168.10.50
to the eth0
interface and add another interface eth1
with DHCP enabled.
kubelet
node IP to come from the subnet 192.168.10.0/24
.
rook-ceph
.
talosctl
CLItalosctl
commands accept config patches as command-line flags.
Config patches might be passed either as an inline value or as a reference to a file with @file.patch
syntax:
talosctl gen config
:
talosctl machineconfig patch
talosctl patch
: