Skip to content

Commit

Permalink
chore: reduce control plane number (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtorChen authored Nov 7, 2024
1 parent 8704fd9 commit 4c01076
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 56 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ This is a mono repository for my home infrastructure and Kubernetes cluster. I u
| Askey RTF8207W | Chunghwa Telecom modem | 1 | | |
| Mikrotik RB4011iGS+RM | Router | 1 | | |
| Mikrotik CRS328-24P-4S+RM | PoE Switch | 1 | | |
| Raspberry Pi 4B with PoE hat | Kubernetes worker nodes | 3 | 8GB | 960GB SSD Micron 5200 |
| Intel NUC11TNHi50L | Kubernetes control planes | 3 | 16\*2 Mircon CT16G4SFRA32A | <div>• OS: 960GB SSD Mircon 5300<div/><div>• Data: 960GB NVMe Mircon 7450 |
| Raspberry Pi 4B with PoE hat | Kubernetes control planes | 1 | 8GB | 960GB SSD Micron 5200 |
| Intel NUC11TNHi50L | Kubernetes worker nodes | 3 | 16\*2 Mircon CT16G4SFRA32A | <div>• OS: 960GB SSD Mircon 5300<div/><div>• Data: 960GB NVMe Mircon 7450 |
| Ubiquiti Power Distribution Pro | 16p Switched and metered PDU | 1 | | |

## 🤝 Acknowledgments
Expand Down
60 changes: 15 additions & 45 deletions talos/.taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tasks:
# controlplane
apply-controlplane:
cmds:
- for: &controlplans [pi4b-1, pi4b-2, pi4b-3]
- for: &controlplans [pi4b-1]
task: tal:apply
vars:
NODE: "{{.ITEM}}"
Expand Down Expand Up @@ -96,65 +96,35 @@ tasks:
vars:
NODE: pi4b-1

# pi4b-2
render-pi4b-2:
# pi4b-spare
render-pi4b-spare:
cmds:
- task: tal:render
vars: &pi4b-2-vars
NODE: pi4b-2
vars: &pi4b-spare-vars
NODE: pi4b-spare
SECRET_ENV: *talos-secret
plan-pi4b-2:
plan-pi4b-spare:
cmds:
- task: tal:plan
vars: *pi4b-2-vars
apply-pi4b-2:
vars: *pi4b-spare-vars
apply-pi4b-spare:
cmds:
- task: tal:apply
vars: *pi4b-2-vars
upgrade-pi4b-2:
vars: *pi4b-spare-vars
upgrade-pi4b-spare:
cmds:
- task: tal:upgrade
vars: *pi4b-2-vars
shutdown-pi4b-2:
vars: *pi4b-spare-vars
shutdown-pi4b-spare:
cmds:
- task: tal:shutdown
vars:
NODE: pi4b-2
reset-pi4b-2:
NODE: pi4b-spare
reset-pi4b-spare:
cmds:
- task: tal:reset
vars:
NODE: pi4b-2

# pi4b-3
render-pi4b-3:
cmds:
- task: tal:render
vars: &pi4b-3-vars
NODE: pi4b-3
SECRET_ENV: *talos-secret
plan-pi4b-3:
cmds:
- task: tal:plan
vars: *pi4b-3-vars
apply-pi4b-3:
cmds:
- task: tal:apply
vars: *pi4b-3-vars
upgrade-pi4b-3:
cmds:
- task: tal:upgrade
vars: *pi4b-3-vars
shutdown-pi4b-3:
cmds:
- task: tal:shutdown
vars:
NODE: pi4b-3
reset-pi4b-3:
cmds:
- task: tal:reset
vars:
NODE: pi4b-3
NODE: pi4b-spare

# nuc11tnhi50l-1
render-nuc11tnhi50l-1:
Expand Down
8 changes: 0 additions & 8 deletions talos/pi4b-3.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion talos/pi4b-2.yaml → talos/pi4b-spare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
machine:
type: controlplane
network:
hostname: amethyst-pi4b-2
hostname: pi4b-spare

0 comments on commit 4c01076

Please sign in to comment.