Skip to content

Commit

Permalink
ACTUALLY fix autoscaling_policy aIas (#364)
Browse files Browse the repository at this point in the history
* ACTUALLY fix autoscaling_policy aIas

* lint
  • Loading branch information
mdelaossa authored Dec 24, 2024
1 parent ba23e72 commit c8266f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ Commands:
aptible services:autoscaling_policy SERVICE # Returns the associated sizing policy, if any
aptible services:autoscaling_policy:set SERVICE --autoscaling-type (horizontal|vertical) [--metric-lookback-seconds SECONDS] [--percentile PERCENTILE] [--post-scale-up-cooldown-seconds SECONDS] [--post-scale-down-cooldown-seconds SECONDS] [--post-release-cooldown-seconds SECONDS] [--mem-cpu-ratio-r-threshold RATIO] [--mem-cpu-ratio-c-threshold RATIO] [--mem-scale-up-threshold THRESHOLD] [--mem-scale-down-threshold THRESHOLD] [--minimum-memory MEMORY] [--maximum-memory MEMORY] [--min-cpu-threshold THRESHOLD] [--max-cpu-threshold THRESHOLD] [--min-containers CONTAINERS] [--max-containers CONTAINERS] [--scale-up-step STEPS] [--scale-down-step STEPS] # Sets the sizing (autoscaling) policy for a service. This is not incremental, all arguments must be sent at once or they will be set to defaults.
aptible services:settings SERVICE [--force-zero-downtime|--no-force-zero-downtime] [--simple-health-check|--no-simple-health-check] # Modifies the zero-downtime deploy setting for a service
aptible services:sizing_policy # Alias for services:autoscaling_policy
aptible services:sizing_policy:set # Alias for services:autoscaling_policy:set
aptible ssh [COMMAND] # Run a command against an app
aptible version # Print Aptible CLI version
```
Expand Down
23 changes: 15 additions & 8 deletions lib/aptible/cli/subcommands/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ def services
end
end
end
desc 'services:sizing_policy',
'Alias for services:autoscaling_policy'
alias_method 'services:sizing_policy',
'services:autoscaling_policy'

no_commands do
alias_method 'services:sizing_policy',
'services:autoscaling_policy'
end

map 'services:sizing_policy' => 'services:autoscaling_policy'

desc 'services:autoscaling_policy:set SERVICE '\
'--autoscaling-type (horizontal|vertical) '\
Expand Down Expand Up @@ -196,10 +199,14 @@ def services
service.create_service_sizing_policy!(**args)
end
end
desc 'services:sizing_policy:set',
'Alias for services:autoscaling_policy:set'
alias_method 'services:sizing_policy:set',
'services:autoscaling_policy:set'

no_commands do
alias_method 'services:sizing_policy:set',
'services:autoscaling_policy:set'
end

map 'services:sizing_policy:set' =>
'services:autoscaling_policy:set'
end
end
end
Expand Down

0 comments on commit c8266f4

Please sign in to comment.