Skip to content

chore(cmx): Remove 'network create/rm/join' commands #548

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

squizzi
Copy link
Member

@squizzi squizzi commented May 28, 2025

This change removes the network create, network rm and network join commands. This moves these actions entirely into the vm create and cluster create paths.

If a user wants to create a network they can do so by using the vm/cluster create CLI, to join to an existing network they can still specify --network as part of that creation process.

The network ls command has been retained to allow users to view their network policies and see an overall list of networks affiliated with running clusters/vms. Networks expire when the last VM/cluster affiliated with them is set to expire, because of this I've removed the EXPIRES column within networks since it can be updated/modified based on modifying anything joined to it, it makes more sense for the user to associate cluster/vm expiration with a TTL value. I've kept the expires_at struct key for troubleshooting via ls -ojson if desired.

This change also deprecates the network update outbound command in favor of network update policy.

./bin/replicated network --help
Manage test networks for VMs and clusters.

Networks are automatically created when you run 'replicated vm create' or
'replicated cluster create'. To connect a VM or cluster to an existing network,
use the '--network' flag during creation. Networks are automatically deleted
when all associated VMs and clusters are removed.


Usage:
  replicated network [command]

Available Commands:
  ls          List test networks.
  update      Update network settings.

Flags:
  -h, --help   help for network

Global Flags:
      --app string     The app slug or app id to use in all calls
      --debug          Enable debug output
      --token string   The API token to use to access your app in the Vendor API

Use "replicated network [command] --help" for more information about a command.


./bin/replicated network ls
ID          NAME                          STATUS      CREATED                  POLICY
5a9f2a47    sleepy_moser                  assigned    2025-05-27 17:01 PDT     open

./bin/replicated network ls
No networks found. Networks are created alongside VMs or clusters.

squizzi added 2 commits May 27, 2025 14:22
* Remove 'expires_at' column from network ls since expiration
  is directly affiliated with cluster/vm expiration.  The struct
  key for expires is still present for troubleshooting.
* Update 'network' command help to explain how networks are created/removed.
* Unhide 'network' commands.

Signed-off-by: Kyle Squizzato <kyle@replicated.com>
Signed-off-by: Kyle Squizzato <kyle@replicated.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant