Add scaling support#28
Merged
Merged
Conversation
👋 Thanks, @galt-tr!This pull request comes from a fork. For security, our CI runs in a restricted mode.
Thanks for contributing to bsv-blockchain/teranode-operator! 🚀 |
|
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.



This pull request introduces Kubernetes Horizontal Pod Autoscaler (HPA) and scaling support for the custom resources
Asset,Propagation, andSubtreeValidator. It enhances their CRDs and controllers to support the/scalesubresource, exposes replica and selector status fields, and improves usability with extra status columns and better error handling. Additionally, it standardizes default replica counts across various deployment specs and improves sample manifests.Kubernetes scaling and CRD enhancements:
replicasandselectorstatus fields to theAssetStatus,PropagationStatus, andSubtreeValidatorStatusstructs, and enabled the/scalesubresource in their CRDs, allowing native Kubernetes scaling and HPA support. [1] [2] [3] [4] [5] [6]PropagationCRD with additional printer columns for desired/current replicas, ready status, and age to improvekubectl getusability.Controller and operator improvements:
AssetReconcilerto synchronize replica and selector status from the underlying deployment, and to requeue reconciliation if the desired and actual replica counts differ, ensuring accurate scaling status reporting. [1] [2]AssetReconcilerto only trigger reconciliations on generation changes, reducing unnecessary reconciles.BlockchainReconcilerto detect and gracefully handle connection errors when running out-of-cluster, avoiding aggressive requeues. [1] [2]Deployment spec standardization:
Asset,BlockAssembly,Blockchain,BlockPersister, andBlockValidatordeployments by referencing new constants, improving consistency and configurability. [1] [2] [3] [4] [5] [6] [7]Sample and configuration updates:
Propagationmanifest to include resource requests/limits and replica fields, aligning it with the new scaling capabilities.Operator initialization and scheme registration:
main.goto explicitly add necessary API schemes and changed the default health probe port. [1] [2] [3] [4] [5]