Repository navigation
feat(compute): per-node instance type override for rolling resize (Part of #273, closes #465) - #466
Merged
bhumi46 merged 4 commits intoOct 15, 2026
Conversation
…sip#465) k8s_instance_type is one type for every cluster node, and changing it updates all nodes in parallel (stop -> modify -> start), taking the whole cluster down at once. Add optional k8s_node_instance_type (compute.tfvars): node name -> instance type, overriding k8s_instance_type for that node only. Default {} changes nothing. In-place update (same instance, private IP and disk), so nodes can be resized one per compute run. Validated: node-name pattern and type format; a name not in the current node counts fails the plan (terraform_data.instance_type_check). Commented example in each profile's compute.tfvars. Tests: compute 20 (15 existing + 5 new). Part of mosip#273. Closes mosip#465. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 17
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…state test value (mosip#465) - compute.tfvars (mosip, esignet-standalone, observ): one "Optional settings" section. For each feature — power state, per-node instance type — the default (commented out), when to uncomment, what happens and how to get back to the default. Example node names exist in each profile (WORKER-NODE-1; observ: CONTROL-PLANE-NODE-1). - vm.tfvars: same structure for the per-group state. - mosip: remove the mosip#437 test value k8s_node_state { "WORKER-NODE-5" = "running" } (mosip#463/mosip#464) — back to default. The next compute plan shows 1 to destroy for aws_ec2_instance_state .k8s_desired["WORKER-NODE-5"], which only stops managing the state; the instance keeps running. Part of mosip#273, part of mosip#465. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bhumi46 <thisisbn46@gmail.com>
…9-node-instance-type Signed-off-by: bhumi46 <thisisbn46@gmail.com>
…osip#465) Above k8s_instance_type / nginx_instance_type in each profile's compute.tfvars: a change is an in-place stop/resize/start; the cluster type resizes every node in one run (k8s_node_instance_type for one at a time); while nginx is stopped its services are down (listed per profile) and its public IP changes (no Elastic IP), so COMPONENT=dns must run right after. Same warning on the nginx_instance_state example. Part of mosip#273, part of mosip#465. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: bhumi46 <thisisbn46@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #273
Closes #465
Problem
k8s_instance_typeis one type for every cluster node. Changing it updates all nodes in parallel (the AWS provider stops, modifies and starts each instance), so every control-plane/etcd member and worker is down at the same time. Nodes can't be resized one at a time, and roles can't get different sizes.What
Optional
k8s_node_instance_typeinprofiles/<profile>/aws/compute.tfvars— rarely needed:{}→ no change for any environment (no new resources in the plan exceptterraform_data.instance_type_checkon the first run).configureneeded.computerun; drain it first; control-plane nodes one at a time so etcd keeps its majority.series.typeformat; a name not in the current node counts fails the plan (terraform_data.instance_type_check).Also in this PR (commit 2)
Comments in
compute.tfvars/vm.tfvarsrewritten (all three profiles): one Optional settings section; for each feature — power state, per-node instance type, vm group state — the default (commented out), when to uncomment, what it does, and Back to default. Example node names exist in each profile.mosip: test value removed —
k8s_node_state = { "WORKER-NODE-5" = "running" }(test(aws): Terraform power state — stop WORKER-NODE-5 via compute.tfvars (Part of #273, #437) #463 / test(aws): Terraform power state — WORKER-NODE-5 back to running (Part of #273, #437) #464). Nextcomputeplan: 1 to destroyaws_ec2_instance_state.k8s_desired["WORKER-NODE-5"]— a no-op in the AWS provider (only stops managing the state); the instance keeps running.Instance-type notes above
k8s_instance_type/nginx_instance_type(commit 3): in-place stop → resize → start; the cluster type resizes every node in one run (usek8s_node_instance_typefor one at a time); while nginx is stopped its services are down (listed per profile: mosip ingress/NFS/PostgreSQL/ActiveMQ storage, esignet-standalone ingress/NFS, observ Rancher/Keycloak ingress + NFS) and its public IP changes (no Elastic IP) → runCOMPONENT=dnsright after. Same warning on thenginx_instance_stateexample.Branch brought up to date with
GH-issue-273-v2(merge commit, signed off) — includes test(aws): resize all mosip cluster nodes t3a.2xlarge → m6a.2xlarge (Part of #273, #437) #467.Tests
terraform testcompute 20 passed (15 existing + 5 new: default type everywhere; override only the named node and nginx unchanged; bad node name; bad type; non-existent node).terraform validate(compute root),fmt -check.🤖 Generated with Claude Code