Skip to content

Commit 6fea75f

Browse files
committed
deprecate --service eks
1 parent 60da7b3 commit 6fea75f

File tree

5 files changed

+8
-269
lines changed

5 files changed

+8
-269
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ $ ec2-instance-selector --help
294294
```
295295

296296
```bash#help
297-
ec2-instance-selector is a CLI tool to filter EC2 instance types based on resource criteria.
297+
ec2-instance-selector is a CLI tool to filter EC2 instance types based on resource criteria.
298298
Filtering allows you to select all the instance types that match your application requirements.
299299
Full docs can be found at github.com/aws/amazon-ec2-instance-selector
300300
@@ -378,7 +378,7 @@ Filter Flags:
378378
Suite Flags:
379379
--base-instance-type string Instance Type used to retrieve similarly spec'd instance types
380380
--flexible Retrieves a group of instance types spanning multiple generations based on opinionated defaults and user overridden resource filters
381-
--service string Filter instance types based on service support (Example: eks, eks-20201211, or emr-5.20.0)
381+
--service string Filter instance types based on service support (Example: emr-5.20.0)
382382
383383
384384
Global Flags:

cmd/main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Full docs can be found at github.com/aws/amazon-` + binName
210210

211211
cli.SuiteStringFlag(instanceTypeBase, nil, nil, "Instance Type used to retrieve similarly spec'd instance types", nil)
212212
cli.SuiteBoolFlag(flexible, nil, nil, "Retrieves a group of instance types spanning multiple generations based on opinionated defaults and user overridden resource filters")
213-
cli.SuiteStringFlag(service, nil, nil, "Filter instance types based on service support (Example: eks, eks-20201211, or emr-5.20.0)", nil)
213+
cli.SuiteStringFlag(service, nil, nil, "Filter instance types based on service support (Example: emr-5.20.0)", nil)
214214

215215
// Configuration Flags - These will be grouped at the bottom of the help flags
216216

@@ -242,6 +242,10 @@ Full docs can be found at github.com/aws/amazon-` + binName
242242
os.Exit(0)
243243
}
244244

245+
if flags[service] != nil {
246+
log.Println("--service eks is deprecated. EKS generally supports all instance types")
247+
}
248+
245249
sess, err := getRegionAndProfileAWSSession(cli.StringMe(flags[region]), cli.StringMe(flags[profile]))
246250
if err != nil {
247251
fmt.Println(err)

pkg/selector/eks.go

-134
This file was deleted.

pkg/selector/eks_test.go

-130
This file was deleted.

pkg/selector/services.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ func (sr *ServiceRegistry) Register(name string, service Service) {
5959

6060
// RegisterAWSServices registers the built-in AWS service filter transforms
6161
func (sr *ServiceRegistry) RegisterAWSServices() {
62-
sr.Register("eks", &EKS{})
6362
sr.Register("emr", &EMR{})
6463
}
6564

6665
// ExecuteTransforms will execute the ServiceRegistry's registered service filter transforms
6766
// Filters.Service will be parsed as <service-name>-<version> and passed to Service.Filters
6867
func (sr *ServiceRegistry) ExecuteTransforms(filters Filters) (Filters, error) {
69-
if filters.Service == nil || *filters.Service == "" {
68+
if filters.Service == nil || *filters.Service == "" || *filters.Service == "eks" {
7069
return filters, nil
7170
}
7271
serviceAndVersion := strings.ToLower(*filters.Service)

0 commit comments

Comments
 (0)