Create IP detection utils and use in AWS security group creation #423
Merged
ArangoGutierrez merged 7 commits intoNVIDIA:mainfrom Jul 24, 2025
Merged
Create IP detection utils and use in AWS security group creation #423ArangoGutierrez merged 7 commits intoNVIDIA:mainfrom
ArangoGutierrez merged 7 commits intoNVIDIA:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces automated public IP detection for AWS environments in Holodeck, eliminating the need for users to manually configure their IP addresses in security group rules. The feature automatically detects the user's public IP using multiple fallback services and formats it correctly for AWS.
- Added IP detection utility with fallback services and validation
- Integrated automatic IP detection into AWS security group creation
- Updated documentation and examples to reflect the optional nature of
ingressIpRanges
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/utils/ip.go |
New utility for IP detection with multiple service fallbacks and validation |
pkg/provider/aws/create.go |
Integration of IP detection into security group creation |
tests/data/test_aws*.yml |
Removal of hardcoded IP ranges from test configurations |
examples/*.yaml |
Updated examples showing optional ingressIpRanges with comments |
docs/guides/ip-detection.md |
New comprehensive guide for IP detection feature |
docs/commands/create.md |
Documentation updates for automated IP detection |
docs/guides/README.md |
Added reference to new IP detection guide |
docs/examples/README.md |
Updated examples documentation |
docs/prerequisites.md |
Updated network requirements |
docs/README.md |
Added link to IP detection guide |
Pull Request Test Coverage Report for Build 16471487882Details
💛 - Coveralls |
- Add utils.GetIPAddress() with HTTP-based IP detection services - Implement fallback services (ipify.org, ifconfig.me, icanhazip.com, ident.me) - Add timeout protection (15s overall, 5s per service) and context support - Include IP validation and proper CIDR notation (/32) for AWS API - Use utils.GetIPAddress() in AWS security group creation - Fix "CIDR block malformed" error in security group creation The new utils package provides reliable public IP detection with proper CIDR formatting, ensuring AWS security groups are created with valid IP ranges for external access. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Collaborator
Author
|
It's ok for CI Pipeline / e2e-test / integration-test (push) to fail, expected during this PR |
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.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.
This pull request introduces automated public IP detection for AWS environments in Holodeck, simplifying configuration and improving usability. The changes include updates to documentation, examples, and the codebase to support this new feature. Below is a summary of the most important changes:
Feature Implementation:
GetIPAddressutility function to automatically detect the user's public IP using multiple fallback services and format it in CIDR notation for AWS compatibility. (pkg/utils/ip.go, pkg/utils/ip.goR1-R114)pkg/provider/aws/create.go, pkg/provider/aws/create.goR252-R262)Documentation Updates:
docs/guides/ip-detection.md, docs/guides/ip-detection.mdR1-R124)README.md,commands/create.md,guides/README.md, andprerequisites.mdfiles. (docs/README.md, [1];docs/commands/create.md, [2];docs/guides/README.md, [3];docs/prerequisites.md, [4]Example Configuration Updates:
ingressIpRangesfield is now optional, as the user's public IP is automatically detected. (examples/aws_kind.yaml, [1];examples/aws_kubeadm.yaml, [2];examples/v1alpha1_environment.yaml, [3]Test Data Updates:
ingressIpRangesentries from test data files to align with the new automated IP detection feature. (tests/data/test_aws.yml, [1];tests/data/test_aws_dra.yml, [2];tests/data/test_aws_kernel.yml, [3];tests/data/test_aws_legacy.yml, [4]These changes collectively enhance the user experience by automating IP configuration for AWS environments, reducing errors, and improving documentation clarity.