Files
home-cluster/bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/plans/talos.yaml.j2
T
Devin Buhl a5cb9b8d39 feat: implement SUC for talos (#1246)
* feat: implement SUC for talos

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: double ---

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: update formatting

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: address PR comments

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-25 08:42:57 -05:00

94 lines
2.3 KiB
YAML

#% if bootstrap_distribution in ['talos'] %#
---
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
name: kubernetes
spec:
# renovate: datasource=docker depName=ghcr.io/siderolabs/kubelet
version: v1.29.1
serviceAccountName: system-upgrade
secrets:
- name: talos
path: /var/run/secrets/talos.dev
ignoreUpdates: true
concurrency: 1
exclusive: true
nodeSelector:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
prepare: &prepare
image: ghcr.io/siderolabs/talosctl:v1.6.3
envs:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
args:
- --nodes=$(NODE_IP)
- health
- --server=false
upgrade:
<<: *prepare
args:
- --nodes=$(NODE_IP)
- upgrade-k8s
- --to=$(SYSTEM_UPGRADE_PLAN_LATEST_VERSION)
---
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
name: talos
spec:
# renovate: datasource=docker depName=ghcr.io/siderolabs/installer
version: v1.6.3
serviceAccountName: system-upgrade
secrets:
- name: talos
path: /var/run/secrets/talos.dev
ignoreUpdates: true
concurrency: 1
exclusive: true
nodeSelector:
matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/controlplane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/etcd
operator: Exists
effect: NoSchedule
prepare: &prepare
image: ghcr.io/siderolabs/talosctl
envs:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
args:
- --nodes=$(NODE_IP)
- health
- --server=false
upgrade:
<<: *prepare
args:
- --nodes=$(NODE_IP)
- upgrade
- --image=factory.talos.dev/installer/#{ addon_system_upgrade_controller.talos_schematic_id|default('df491c50a5acc05b977ef00c32050e1ceb0df746e40b33c643ac8a9bfb7c7263', true) }#:$(SYSTEM_UPGRADE_PLAN_LATEST_VERSION)
- --preserve=true
- --wait=false
#% endif %#