-
Notifications
You must be signed in to change notification settings - Fork 12
HYPERFLEET-29 | feat(config): add configurable adapter requirements #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HYPERFLEET-29 | feat(config): add configurable adapter requirements #40
Conversation
WalkthroughThe PR introduces a new AdapterRequirementsConfig that reads HYPERFLEET_CLUSTER_ADAPTERS and HYPERFLEET_NODEPOOL_ADAPTERS from the environment (JSON arrays) with defaults. Services (ClusterService, NodePoolService) are updated to accept and store this config instead of using hard-coded adapter lists. Status aggregation logic references the configuration, and docs/Helm values were updated with examples and commented env templates. Tests for the config parsing were added. Sequence DiagramsequenceDiagram
participant Startup as Application Startup
participant Plugin as Plugin (clusters/nodePools)
participant Config as AdapterRequirementsConfig
participant Env as Environment Variables
participant Service as ClusterService/NodePoolService
participant StatusLogic as Status Aggregation
Startup->>Plugin: Initialize
Plugin->>Config: NewAdapterRequirementsConfig()
Config->>Env: LoadFromEnv()
Env-->>Config: HYPERFLEET_CLUSTER_ADAPTERS / HYPERFLEET_NODEPOOL_ADAPTERS
Config-->>Plugin: return adapter config
Plugin->>Service: NewClusterService(..., adapterConfig) / NewNodePoolService(..., adapterConfig)
Service->>Service: store adapterConfig
Service->>StatusLogic: UpdateStatusFromAdapters()
StatusLogic->>Service: read adapterConfig.RequiredClusterAdapters / RequiredNodePoolAdapters
StatusLogic->>StatusLogic: Compute phase using configured adapters
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Comment |
|
/lgtm as a temporary fix |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rh-amarin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d2d13e4
into
openshift-hyperfleet:main
Summary by CodeRabbit
New Features
Documentation
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.