This repository was archived by the owner on Jun 11, 2025. It is now read-only.
Fix/gvpn gateway allowed ips#371
Merged
Merged
Conversation
- apparently, cluster gateway's allowed IP could easily have been 100.64.0.0/10, but idk why i had all possible 256 combinations in there 😂
Reviewer's Guide by SourceryThis pull request addresses issues related to Global VPN (GVPN) gateway allowed IPs and introduces a new resolver for DNS host suffix. The changes primarily affect the handling of allowed IPs for GVPN devices and improve the robustness of peer hashing. Sequence DiagramNo sequence diagram generated. File-Level Changes
Tips and commands
|
There was a problem hiding this comment.
Hey @nxtcoder17 - I've reviewed your changes - here's some feedback:
Overall Comments:
- The change in global-vpn-devices.go replaces a dynamic list with a hardcoded CIDR. Please provide more context on why this change was necessary and document the reasoning in the code comments.
- Consider adding error handling to the new CoreGetDNSHostSuffix function in schema.resolvers.go, or explain why it's not necessary in this case.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Comment on lines
+457
to
+458
| func (r *queryResolver) CoreGetDNSHostSuffix(ctx context.Context) (string, error) { | ||
| return r.EnvVars.KloudliteDNSSuffix, nil |
There was a problem hiding this comment.
suggestion: Consider adding error handling for KloudliteDNSSuffix
The function assumes KloudliteDNSSuffix is always available and valid. Consider adding a check to ensure it's not empty or invalid, and return an appropriate error if it is.
Suggested change
| func (r *queryResolver) CoreGetDNSHostSuffix(ctx context.Context) (string, error) { | |
| return r.EnvVars.KloudliteDNSSuffix, nil | |
| func (r *queryResolver) CoreGetDNSHostSuffix(ctx context.Context) (string, error) { | |
| if r.EnvVars.KloudliteDNSSuffix == "" { | |
| return "", errors.New("KloudliteDNSSuffix is empty") | |
| } | |
| return r.EnvVars.KloudliteDNSSuffix, nil | |
| } |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Resolves kloudlite/kloudlite#295
Summary by Sourcery
Fix the allowed IPs configuration in global VPN devices and add a new resolver for retrieving DNS host suffix.
Bug Fixes:
Enhancements: