-
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
Add Wireguard Support and create a fake SMD #38
Open
alexlovelltroy
wants to merge
7
commits into
main
Choose a base branch
from
alovelltroy/add-wireguard-support
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
…anagement feat: add unit tests for cloud-init server handlers and implement local inventory structure
…, update dependencies, and remove obsolete tests feat: remove obsolete JSON configuration files and update add_node.sh to include group assignment feat: refactor instance data generation and update group metadata handling feat: enhance cloud-init server with group user data handling and improve vendor data response * refactor code to put less in citypes and more in local handlers feat: add scripts for hostname override and cluster defaults, refactor ciStore interface, update group handling, add cluster defaults endpoints and support to override the hostnames as needed feat: add update node functionality to FakeSMDClient and corresponding HTTP handler fix: remove unnecessary unlock call in PopulateNodes method of SMDClient fix: streamline locking mechanism in PopulateNodes method of SMDClient
…adata handlers fix: update SetClusterDefaults method to use locking and improve cluster defaults handling feat: update cluster defaults demo script to show ssh key and base-url fix: improve error handling in GroupUserDataHandler to return empty cloud-config on missing group data fix: update base URL in demo script and trim trailing slashes in SetClusterDefaults method feat: Allow node update to include own ip/mac fix: update UpdateGroupData method to support creating group data if it doesn't exist
…dler fix: enhance error handling and logging in WireGuard setup and client management feat: enhance WireGuard server initialization and improve metadata field naming conventions feat: implement IP address allocation management with IPAllocator and integrate into InterfaceManager feat: add WireGuard IP management methods to SMDClient and FakeSMDClient feat: enhance WireGuard client addition by integrating SMD client for IP management feat: enhance IPAllocator with network and broadcast address calculations and add unit tests Update IpforPeer to return existing wgip for peer feat: add support for WireGuard setup and implement middleware for access control
travisbcotton
approved these changes
Jan 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of changes here, but I've tested it on one of our test systems and it all works. Not exhaustive tests though
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 several new features and refactors existing code in the
cloud-init-server
. The main change is the addition of WireGuard support. In addition, there are new HTTP handlers for managing groups and a refactor of the main server initialization, and removing old instance data handling code.New Features:
-wireguard-server 100.97.0.1/16
and-wireguard-only
. When enabled, the server will create a narrow tunnel for each client and only allow requests that come through the tunnel.CLOUD_INIT_SMD_SIMULATOR=true
. There is no persistence and it generates 500 fake nodes for testing.GetGroups
,AddGroupHandler
,GetGroupHandler
,UpdateGroupHandler
, andRemoveGroupHandler
ingroup_handlers.go
.Refactoring:
main.go
to include new configuration options and WireGuard support. This includes setting up thecistore
, adding new flags, and initializing the WireGuard server. [1] [2] [3] [4]Code Removal:
instance_data.go
and its associated tests frominstance_data_test.go
. [1] [2]handlers_test.go
.