Skip to content

Commit

Permalink
Merge pull request #1206 from jr-dimedis/upgrading-fixes
Browse files Browse the repository at this point in the history
Automatic updating fixes (README and Kured options)
  • Loading branch information
mysticaltech committed Feb 22, 2024
2 parents e911232 + efc7f73 commit b780aa3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,25 @@ _If you wish to turn off automatic MicroOS upgrades (Important if you are not la
automatically_upgrade_os = false
```

_Alternatively ssh into each node and issue the following command:_
Alternatively ssh into each node and issue the following command:

```sh
systemctl --now disable transactional-update.timer
```

_If you wish to turn off automatic k3s upgrades, you need to set:_
If you wish to turn off automatic k3s upgrades, you need to set:

```terraform
automatically_upgrade_k3s = false
```

_Alternatively, you can either remove the `k3s_upgrade=true` label or set it to `false`. This needs to happen for all the nodes too! To remove the node label completely, apply `-` at the end of the label:
_Once disabled this way you selectively can enable the upgrade by setting the node label `k3s_update=true` and later disable it by removing the label or set it to `false` again._

```sh
# Enable upgrade for a node (use --all for all nodes)
kubectl label --overwrite node <node-name> k3s_upgrade=true

# Later disable upgrade by removing the label (use --all for all nodes)
kubectl label node <node-name> k3s_upgrade-
```

Expand All @@ -250,7 +254,7 @@ kubectl delete plan k3s-server -n system-upgrade
Also, note that after turning off node upgrades, you will need to manually upgrade the nodes when needed. You can do so by SSH'ing into each node and running the following commands (and don't forget to drain the node before with `kubectl drain <node-name>`):

```sh
transactional-update
systemctl start transactional-update.service
reboot
```

Expand Down
1 change: 1 addition & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ installCRDs: true
"pre-reboot-node-labels" : "kured=rebooting",
"post-reboot-node-labels" : "kured=done",
"period" : "5m",
"reboot-sentinel" : "/sentinel/reboot-required"
}, var.kured_options)

k3s_registries_update_script = <<EOF
Expand Down

0 comments on commit b780aa3

Please sign in to comment.