mirror of
https://github.com/khuedoan/homelab.git
synced 2025-03-10 12:51:28 +07:00
feat(system-upgrade): allow upgrading Rocky Linux
This commit is contained in:
parent
de4b410484
commit
f3b8482349
@ -4,3 +4,4 @@ kind: Kustomization
|
||||
resources:
|
||||
- https://github.com/rancher/system-upgrade-controller/releases/download/v0.8.1/system-upgrade-controller.yaml
|
||||
- k3s
|
||||
- rocky-linux
|
||||
|
9
system/system-upgrade/rocky-linux/kustomization.yaml
Normal file
9
system/system-upgrade/rocky-linux/kustomization.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- upgrade.yaml
|
||||
|
||||
commonAnnotations:
|
||||
# TODO https://github.com/rancher/system-upgrade-controller/issues/172
|
||||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
|
38
system/system-upgrade/rocky-linux/upgrade.yaml
Normal file
38
system/system-upgrade/rocky-linux/upgrade.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
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
|
||||
version: 20220123 # TODO dummy value
|
Loading…
Reference in New Issue
Block a user