forked from gatewayd-io/gatewayd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/enable multi pool client connections #5
Open
sinadarbouy
wants to merge
15
commits into
main
Choose a base branch
from
feature/enable-multi-pool-client-connections
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Overview
Packages and Vulnerabilities (35 package changes and 3 vulnerability changes)
Changes for packages of type
|
sinadarbouy
force-pushed
the
feature/enable-multi-pool-client-connections
branch
3 times, most recently
from
July 14, 2024 17:26
04334b8
to
d35c2ab
Compare
Pull Request Test Coverage Report for Build 10134448031Details
💛 - Coveralls |
sinadarbouy
force-pushed
the
feature/enable-multi-pool-client-connections
branch
3 times, most recently
from
July 23, 2024 18:32
016dac1
to
491cad3
Compare
This commit introduces significant updates to enhance the handling of proxies within the server configuration and adds support for load balancing strategies. Changes: - Updated API tests to reflect changes from a single `Proxy` to a list of `Proxies`. - Adjusted initialization and configuration of proxies in `run.go` to support multiple proxies and load balancer strategies. - Updated configuration files to include new fields for multiple proxies and load balancer strategies. - Enhanced global configuration validation for clients, pools, and proxies. - Added new `loadBalancer` section in `gatewayd.yaml` for rules and strategies. - Implemented load balancing strategy selection and Round Robin strategy. - Added tests for load balancer strategies. - Added new error type `ErrorCodeLoadBalancerStrategyNotFound`. - Improved proxy connection handling and added informative comments. Configuration Example: - Updated `gatewayd.yaml` to reflect new support for multiple proxies and load balancer strategies. - Ensure to update your configuration files accordingly. Testing: - Updated existing tests and added new tests for multi-proxy and load balancing functionality. - Verified configuration validation for proxies and load balancers. Impact: - Improved flexibility and scalability of server configuration. - Enabled robust proxy management and efficient load distribution. Update errors/errors.go Co-authored-by: Mostafa Moradian <[email protected]> Signed-off-by: sina <[email protected]> fixed review problems
sinadarbouy
force-pushed
the
feature/enable-multi-pool-client-connections
branch
from
July 23, 2024 20:11
491cad3
to
585ed7f
Compare
- Change pools, clients, and proxies to use map[string]map[string] instead of map[string] - Update related code for compatibility with new nested map structure
remvoed server 2 from gatewatd.yaml file
…iles Updated variable names in the API, test files, run command, and configuration files to improve code readability and maintainability. Key changes include: 1. **api.go**: - Renamed `configurationGroupPools` to `configGroupPools` for clarity. 2. **api_helpers_test.go, api_test.go**: - Updated to use `config.DefaultConfigurationBlock` instead of `config.DefaultPool` and `config.DefaultProxy` for better naming consistency. 3. **run.go**: - Changed iteration variables to `configGroup` and `configBlockName` for better descriptive naming. - Updated logging and error handling to use `configBlockName`. - Modified span attribute naming for tracing proxy creation. 4. **config.go**: - Updated `DefaultPool`, `DefaultClient`, and `DefaultProxy` to `DefaultConfigurationBlock` in the `LoadDefaults` function. - Enhanced configuration parsing logic to handle `DefaultConfigurationBlock` appropriately and ensure robust error handling. 5. **constants.go**: - Renamed `DefaultClient`, `DefaultPool`, and `DefaultProxy` to `DefaultConfigurationBlock`. - Retained other configuration constants for environment prefix, tracer name, and configuration filenames. These changes enhance the codebase by standardizing variable names, improving readability, and making the code easier to maintain.
- Enhanced the Client struct by adding YAML tags to all fields, ensuring compatibility with YAML parsers. - Added YAML tags to the Size field in the Pool struct. - Included YAML tags for the HealthCheckPeriod field in the Proxy struct. These changes address limitations of the YAML parser and ensure proper serialization and deserialization of configuration data.
Co-authored-by: Mostafa Moradian <[email protected]> Signed-off-by: sina <[email protected]>
- Modified the GetServers endpoint to return the current load balancer configuration for each server. - Added a new field "loadBalancer" to the server details, including the load balancer strategy name. - Updated unit tests to validate the new "loadBalancer" field in the API response. - Adjusted test setup to include the default load balancer strategy configuration.
Renamed short variable names used in type assertions to longer, more descriptive names to resolve golint warnings about variable name length.
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.
Ticket(s)
Description
Related PRs
Development Checklist
make gen-docs
command.Legal Checklist