Repository navigation
feat: add opt-in inputs for a node pool Service - #71
Merged
Merged
Conversation
Per instance: termination_grace_period_seconds and spread_hosts (a preferred hostname anti-affinity). Per Service: headless (Ready-only DNS) and pdb_max_unavailable (a PodDisruptionBudget named after the Service). All default off; existing callers render unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Implements the demeter-run plan
ogmios-improvement-node-capacity-node-module(decision 0029: one mainnet node pool on Spot, balanced through a headless Service). Thebootstrap/module gets four opt-in inputs. Wiring stage4 and choosing values is a separate change.New inputs
termination_grace_period_secondsinstances[*]nullnullkeeps the Kubernetes default (30 s). Validated as a positive whole number.spread_hostsinstances[*]falsekubernetes.io/hostname, selectorrole=node,network=<instance network>. It sits beside the existing node affinity, which is unchanged. It is neverrequired, because the cluster has no autoscaler.headlessservices[*]falsecluster_ip = "None"andpublish_not_ready_addresses = false, with the same selector and ports (n2c3307,n2n3000)._n2c._tcp.<name>.<namespace>.svc.cluster.localthen lists Ready pods only.pdb_max_unavailableservices[*]nullpolicy/v1PodDisruptionBudget named after the Service, with thismaxUnavailableand the Service's selector. Validated as a non-negative whole number.The
nodes-<salt>peer Services are untouched and still publish not-ready addresses for the mempool mesh.Existing callers see no diff
null(unset). Theaffinityblock renders under the same condition as before.cluster_ipandpublish_not_ready_addressesarenull(unset). The PDB count is 0.terraform plan -refresh=false -lock=false -target=module.ext_cnode_m1form2-prod-7xjh33/stage4twice, using the same state and config. The only difference between the runs was the module: once the pinnedaade6e2, once this branch. Both plans have the same output,0 to add, 4 to change, 0 to destroy. Those 4 changes are readiness-probe updates on the preprod/previewb00/b10instances, committed in stage4 but not yet applied. This PR adds none of them.instance/node.tfshows a large diff only because the existingnode_affinityblock is now adynamicblock, sospread_hostscan render without an empty node affinity. Review withgit diff -w.Note for wiring: switching an existing Service to
headlesschanges its cluster IP, and Terraform will replace that Service. Add a new Service entry instead. The README says this too.Verification (in
bootstrap/)terraform fmt -check: pass. (fmt -check -recursivestill flagscrds/main.tf,feature/config.tfandrelay/main.tf. That drift was already onmainand is left alone here.)terraform validate: pass. The warnings are the existing provider deprecation notices.terraform test: 20 passed, 0 failed. The newtests/node_capacity.tftest.hclhas 11 runs:role/networkselector, and leaves the node affinity as it was;cluster_ip = "None",publish_not_ready_addresses = false, the usual selector and both ports;pdb_max_unavailableis set, takes the Service's name and selector, and carries the value;publish_not_ready_addressestotrue, or changing the weight to 50, fails the matching runs.🤖 Generated with Claude Code