2022-01-23 17:16:48 +07:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: rocky-upgrade
|
|
|
|
namespace: system-upgrade
|
|
|
|
type: Opaque
|
|
|
|
stringData:
|
|
|
|
upgrade.sh: |
|
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
dnf upgrade -y
|
|
|
|
command -v needs-restarting || dnf install -y dnf-utils
|
|
|
|
needs-restarting --reboothint || reboot
|
|
|
|
---
|
|
|
|
apiVersion: upgrade.cattle.io/v1
|
|
|
|
kind: Plan
|
|
|
|
metadata:
|
|
|
|
name: rocky-upgrade
|
|
|
|
namespace: system-upgrade
|
|
|
|
spec:
|
|
|
|
serviceAccountName: system-upgrade
|
|
|
|
secrets:
|
|
|
|
- name: rocky
|
|
|
|
path: /host/run/system-upgrade/secrets/rocky
|
|
|
|
upgrade:
|
|
|
|
image: rockylinux
|
|
|
|
command:
|
|
|
|
- chroot
|
|
|
|
- /host
|
|
|
|
args:
|
|
|
|
- sh
|
|
|
|
- /run/system-upgrade/secrets/rocky/upgrade.sh
|
|
|
|
concurrency: 1
|
|
|
|
cordon: true
|
|
|
|
drain:
|
|
|
|
force: true
|
|
|
|
skipWaitForDeleteTimeout: 300 # Honor PodDisruptionBudgets
|
2022-01-23 17:19:26 +07:00
|
|
|
version: "20220123" # TODO dummy value
|