kubekey/builtin/core/roles/etcd/meta/main.yaml
redscholar c044b8aa26
fix: scaling down etcd
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
2025-12-04 10:38:48 +08:00

24 lines
628 B
YAML

---
dependencies:
- role: etcd/prepare
- role: etcd/upgrade
when:
- .etcd_install_LoadState.stdout | eq "loaded"
- .etcd.etcd_version | semverCompare (printf ">v%s" (index .etcd_install_version "stdout" "etcd Version"))
- role: etcd/scaling_up
when:
- .installed_etcd | empty | not
- .need_installed_etcd | fromJson | empty | not
- role: etcd/scaling_down
when:
- .need_uninstall_etcd | fromJson | empty | not
- role: etcd/install
when:
- .etcd_install_LoadState.stdout | eq "not-found"
- .need_uninstall_etcd | fromJson | has .inventory_hostname | not