Upgrade to v0.3.4
This guide provides information about upgrading talos-operator from versions <0.3.4 to v0.3.4.
Changes in v0.3.4
The biggest change in the API is the addition of the address and machineRef fields in the Machine struct used in both TalosControlPlane and TalosWorker resources. These fields allow users to specify either a direct IP address for a Talos machine or a reference to another Kubernetes object from which the IP address can be extracted.
Basically it is changing the format from:
machines:
- "10.0.153.137"
to:
machines:
- address: 10.0.153.137
Ideally now users can also use machineRef to point to another Kubernetes object that contains the IP address of the Talos machine. This provides more flexibility in managing machine addresses, especially in dynamic environments where IPs might change or need to be retrieved from other resources.
The example usage of machineRef would be:
machines:
- machineRef:
apiVersion: proxmox.alperen.cloud/v1alpha1
fieldPath: .status.status.IPAddress
kind: VirtualMachine
name: talos-master-0
- machineRef:
apiVersion: proxmox.alperen.cloud/v1alpha1
fieldPath: .status.status.IPAddress
kind: VirtualMachine
name: talos-master-1
Tip
You can use any other Custom Resource Definitions (CRDs) or built-in Kubernetes resources as long as they contain the IP address of the Talos machine and you provide the correct fieldPath to extract the IP address.
Upgrade Steps
The only thing that you need to do is to update your existing TalosControlPlane and TalosWorker resources to use the new address or machineRef fields instead of the old format. There is no specific sequence of steps required to perform the upgrade. That means you can upgrade talos-operator directly to v0.3.4 and then modify your resources accordingly.
Example
Here is an example of how to update your TalosControlPlane resource:
Before (v0.3.3 and earlier):
apiVersion: talos.alperen.cloud/v1alpha1
kind: TalosControlPlane
metadata:
name: taloscontrolplane-sample
spec:
version: v1.11.1
mode: metal
kubeVersion: v1.33.0
metalSpec:
machines:
- "10.0.153.137"
endpoint: "https://10.0.153.137:6443"
After (v0.3.4 and later):
apiVersion: talos.alperen.cloud/v1alpha1
kind: TalosControlPlane
metadata:
name: taloscontrolplane-sample
spec:
version: v1.11.1
mode: metal
kubeVersion: v1.33.0
metalSpec:
machines:
- address: 10.0.153.137
or alteranively using machineRef:
apiVersion: talos.alperen.cloud/v1alpha1
kind: TalosControlPlane
metadata:
name: taloscontrolplane-sample
spec:
version: v1.11.1
mode: metal
kubeVersion: v1.33.0
metalSpec:
machines:
- machineRef:
apiVersion: proxmox.alperen.cloud/v1alpha1
fieldPath: .status.status.IPAddress
kind: VirtualMachine
name: talos-master-0