Skip to content

Commit

Permalink
Merge pull request #349 from appuio/fix/node-decommissioning
Browse files Browse the repository at this point in the history
Fix "remove a worker node" how-tos for cloudscale and Exoscale
  • Loading branch information
simu authored Aug 9, 2024
2 parents fe327b3 + 9cb029d commit 72c124e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/how-tos/cloudscale/remove_node.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:kubectl_extra_args: --as=cluster-admin
:delabel_app_nodes: yes

:node-delete-list: ${NODE_TO_REPLACE}
:node-delete-list: ${NODE_TO_REMOVE}
:delete-nodes-manually: no

[abstract]
Expand Down Expand Up @@ -48,10 +48,10 @@ It has to be the one with the highest terraform index.
# Grab JSON copy of current Terraform state
terraform state pull > .tfstate.json
export NODE_TO_REMOVE=$(jq --arg index "$node_count" -r \
export NODE_TO_REMOVE=$(jq -r \
'.resources[] |
select(.module=="module.cluster.module.worker" and .type=="cloudscale_server") |
.instances[$index|tonumber-1] |
.instances[.instances|length-1] |
.attributes.name | split(".") | first' \
.tfstate.json)
echo $NODE_TO_REMOVE
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/how-tos/exoscale/remove_node.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ It has to be the one with the highest terraform index.
# Grab JSON copy of current Terraform state
terraform state pull > .tfstate.json
export NODE_TO_REMOVE=$(jq --arg index "$node_count" -r \
export NODE_TO_REMOVE=$(jq -r \
'.resources[] |
select(.module=="module.cluster.module.worker" and .type=="exoscale_compute") |
.instances[$index|tonumber-1] |
.instances[.instances|length-1] |
.attributes.hostname' \
.tfstate.json)
echo $NODE_TO_REMOVE
Expand Down

0 comments on commit 72c124e

Please sign in to comment.