DevopsArtFactory / goployer

AWS Deployer with Go
https://goployer.dev
Apache License 2.0
72 stars 13 forks source link

add spot override instace types option #137

Closed YoungJinJung closed 3 years ago

YoungJinJung commented 3 years ago

Fixes: #136 Related: Relevant tracking issues, for context Merge before/after: Dependent or prerequisite PRs

Description

Mixed instance policy have override instance type, but this option cannot override in runtime.

So, in this PR i implement instance type in mixed instance policy override in runtime.

multiple type also accept. but, only use same instance types.(arm64 and x86_64 cannot use at the same time)

ex) --override-spot-types="t2.nano|t3.large"

User facing changes (remove if N/A)

User use this option, then dynamically change spot instance type in goployer!!

Follow-up Work (remove if N/A)

codecov[bot] commented 3 years ago

Codecov Report

Merging #137 (c3f5436) into main (cb214de) will increase coverage by 0.47%. The diff coverage is 17.77%.

Impacted file tree graph

@@           Coverage Diff            @@
##            main    #137      +/-   ##
========================================
+ Coverage   4.82%   5.29%   +0.47%     
========================================
  Files         29      29              
  Lines       4721    5359     +638     
========================================
+ Hits         228     284      +56     
- Misses      4481    5060     +579     
- Partials      12      15       +3     
Impacted Files Coverage Δ
pkg/aws/ec2.go 0.00% <0.00%> (ø)
pkg/builder/builder.go 47.97% <ø> (+0.70%) :arrow_up:
pkg/constants/constants.go 75.00% <ø> (+8.33%) :arrow_up:
pkg/deployer/deployer.go 2.58% <29.62%> (+1.38%) :arrow_up:
pkg/tool/frigga.go 26.08% <0.00%> (-3.33%) :arrow_down:
pkg/aws/s3.go 0.00% <0.00%> (ø)
pkg/aws/aws.go 0.00% <0.00%> (ø)
pkg/aws/elb.go 0.00% <0.00%> (ø)
pkg/aws/ssm.go 0.00% <0.00%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cb214de...c3f5436. Read the comment docs.