Repository navigation
Conversation
|
Thank you very much @StevenPG . May I kindly ask you to split the PR so it can be reviewed and merged indenpendently ? |
cd75487 to
2fed96d
Compare
Worker nodes of the EKS managed node group are only replaced by the Auto Scaling group when the EC2 status checks fail. A node whose kubelet stops reporting (e.g. due to memory exhaustion) while the instance itself stays healthy remains `NotReady` indefinitely. This is especially harmful to the datastore: a CockroachDB or Yugabyte pod cannot safely be rescheduled on a node already hosting another datastore replica, so the replica of an unhealthy node stays down until the node recovers by itself. GKE node pools enable auto repair by default. This change aligns the AWS deployment by enabling EKS node auto repair through `node_repair_config` on `aws_eks_node_group`. The behavior is controlled by a new variable, `aws_enable_node_auto_repair` (default `true`), exposed by the `terraform-aws-dss` module. The change is applied in place on existing node groups and does not replace nodes. Part of interuss#1782. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2fed96d to
48f47e7
Compare
| } | ||
|
|
||
| node_repair_config { | ||
| enabled = var.aws_enable_node_auto_repair |
There was a problem hiding this comment.
I think we should limit auto repair to one node at a time with max_parallel_nodes_repaired_count = 1, so that a majority of the datastore nodes stays available during repairs.
This requires AWS provider 6.20.0 or later.
There was a problem hiding this comment.
Added this is commit: 5da6637
I tried to keep the configuration open such that the two options are 1 or null, that way the onus isn't on the deployer to make a determination on the ideal value, but users who need the prior no-repair implementation can opt-out.
| Example: `true` | ||
| EOT | ||
|
|
||
| default = true |
There was a problem hiding this comment.
Can you please provide a reference to check GKE feature parity ?
There was a problem hiding this comment.
My understanding is that for the google terraform provider, if a section is not provided, the default values are used.
I looked through the GKE documentation and I believe I understood it well enough to make that claim, but let me know if I'm off base!
[auto_repair](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#auto_repair-1) - (Optional) Whether the nodes will be automatically repaired. Enabled by default.
The GKE configuration doesn't include a management block:
Set max_parallel_nodes_repaired_count = 1 so that a majority of the datastore nodes stays available during repairs. This requires AWS provider 6.20.0 or later. Also reference the GKE auto repair default in the variable description. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… agent add-on Resolve merge conflicts with interuss#1784, which added the adjacent aws_enable_node_monitoring_agent variable. Both variables are kept in variables.py, terraform-aws-dss/main.tf and NEXT_RELEASE_NOTES.md, and the *.gen.tf / TFVARS.gen.md files were regenerated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Part of #1782.
Changes
Enable EKS node auto repair on the managed node group (
node_repair_config), controlled by a newaws_enable_node_auto_repairvariable that defaults totrue, matching GKE's default behavior. Unhealthy nodes (for example stuck inNotReady) are drained and replaced automatically. Applying this to an existing cluster updates the node group in place and does not replace nodes. Setaws_enable_node_auto_repair = falseto keep the previous behavior.Testing
terraform fmt -recursive -check deployterraform validateonterraform-aws-dssgenerate_terraform_variables.sh --lintApplied to a live cluster
Applied to an existing EKS 1.34 deployment (3 nodes, CockroachDB, us-west-1) that was created with an older version of this module. The same apply also changed
aws_instance_type, so the node group was replaced rather than updated in place.node_repair_configenabled was created successfully, and the old group was drained and deleted. With CockroachDB set to hard pod anti-affinity through a Helm override, the pods moved one at a time and CockroachDB kept 3 live nodes and 0 unavailable ranges.aws eks describe-nodegroupreportsnodeRepairConfig.enabled: true.terraform planshows no changes.