Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/commands/local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ mod install;
mod listmonk;
pub mod package_install;
mod reset;
mod resize;
mod start;
mod stop;
mod uninstall;
Expand Down Expand Up @@ -74,7 +75,9 @@ pub enum LocalCommands {
/// Reset local Colima Kubernetes state
Reset,
/// Start local k8s cluster with Crossplane and providers
Start,
Start(start::StartArgs),
/// Resize the local Colima VM without destroying cluster state
Resize(resize::ResizeArgs),
/// Check what `hops local start` set up and report drift
Doctor,
/// Configure crossplane-contrib provider-family-aws and AWS ProviderConfig
Expand Down Expand Up @@ -104,7 +107,8 @@ pub fn run(args: &LocalArgs) -> Result<(), Box<dyn Error>> {
match &args.command {
LocalCommands::Install => install::run(),
LocalCommands::Reset => reset::run(),
LocalCommands::Start => start::run(),
LocalCommands::Start(start_args) => start::run(start_args),
LocalCommands::Resize(resize_args) => resize::run(resize_args),
LocalCommands::Doctor => doctor::run(),
LocalCommands::Aws(aws_args) => aws::run(aws_args),
LocalCommands::Github(github_args) => github::run(github_args),
Expand Down
15 changes: 15 additions & 0 deletions src/commands/local/resize.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use super::start::{resize_colima, ColimaSizeArgs};
use clap::Args;
use std::error::Error;

#[derive(Args, Debug, Clone)]
pub struct ResizeArgs {
#[command(flatten)]
pub size: ColimaSizeArgs,
}

pub fn run(args: &ResizeArgs) -> Result<(), Box<dyn Error>> {
resize_colima(&args.size)?;
log::info!("Colima resize complete");
Ok(())
}
Loading