-
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement SUC for talos (#1246)
* feat: implement SUC for talos Signed-off-by: Devin Buhl <[email protected]> * fix: double --- Signed-off-by: Devin Buhl <[email protected]> * fix: update formatting Signed-off-by: Devin Buhl <[email protected]> * fix: address PR comments Signed-off-by: Devin Buhl <[email protected]> --------- Signed-off-by: Devin Buhl <[email protected]>
- Loading branch information
Showing
9 changed files
with
169 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/.mjfilter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
main = lambda data: data.get("bootstrap_distribution") in ['k3s'] and data.get("addon_system_upgrade_controller", {}).get("enabled", False) == True | ||
main = lambda data: data.get("bootstrap_distribution") in ['k3s', 'talos'] and data.get("addon_system_upgrade_controller", {}).get("enabled", False) == True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/plans/agent.yaml.j2
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/plans/k3s.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#% if bootstrap_distribution in ['k3s'] %# | ||
--- | ||
apiVersion: upgrade.cattle.io/v1 | ||
kind: Plan | ||
metadata: | ||
name: controllers | ||
spec: | ||
# renovate: datasource=github-releases depName=k3s-io/k3s | ||
version: "v1.29.0+k3s1" | ||
upgrade: | ||
image: rancher/k3s-upgrade | ||
serviceAccountName: system-upgrade | ||
concurrency: 1 | ||
cordon: true | ||
nodeSelector: | ||
matchExpressions: | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: Exists | ||
tolerations: | ||
- effect: NoSchedule | ||
operator: Exists | ||
- effect: NoExecute | ||
operator: Exists | ||
- key: node-role.kubernetes.io/control-plane | ||
effect: NoSchedule | ||
operator: Exists | ||
- key: node-role.kubernetes.io/master | ||
effect: NoSchedule | ||
operator: Exists | ||
- key: node-role.kubernetes.io/etcd | ||
effect: NoExecute | ||
operator: Exists | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
--- | ||
apiVersion: upgrade.cattle.io/v1 | ||
kind: Plan | ||
metadata: | ||
name: workers | ||
spec: | ||
# renovate: datasource=github-releases depName=k3s-io/k3s | ||
version: "v1.29.0+k3s1" | ||
serviceAccountName: system-upgrade | ||
concurrency: 1 | ||
nodeSelector: | ||
matchExpressions: | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: DoesNotExist | ||
prepare: | ||
image: rancher/k3s-upgrade | ||
args: ["prepare", "server"] | ||
upgrade: | ||
image: rancher/k3s-upgrade | ||
#% endif %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/plans/server.yaml.j2
This file was deleted.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
bootstrap/templates/kubernetes/apps/tools/system-upgrade-controller/plans/talos.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#% 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 %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters