Skip to content
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

feat(ecs): support selecting multiple subnet types #8724

Merged
merged 2 commits into from
Dec 16, 2020

Conversation

piradeepk
Copy link
Contributor

@piradeepk piradeepk commented Nov 11, 2020

Add support for multiple subnet types in the ECS Provider.

This change is dependent on spinnaker/clouddriver#5087 being merged in first!

Closes: spinnaker/spinnaker#6097

Screen Shot 2020-12-15 at 4 57 17 PM

Screen Shot 2020-12-15 at 5 55 17 PM

Screen Shot 2020-12-15 at 4 59 24 PM

Screen Shot 2020-12-15 at 4 59 29 PM

@piradeepk
Copy link
Contributor Author

piradeepk commented Nov 11, 2020

Currently Testing (will remove do-not-merge label once ready).

Copy link
Contributor

@allisaurus allisaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple questions, including this one:

  • is there anywhere in deck we need to make changes in order to correctly display multiple subnets on a service? (like cluster/LB views - these might only use VPC but want to confirm)

also can you add some test output/screenshots of:

  • the multi-select for subnetTypes working
  • a successful deployment w/ multiple subnets (ECS console)
  • a validation error when both subnetType and subnetTypes are used?

@@ -336,7 +337,7 @@ export class EcsServerGroupConfigurationService {
.filter({
account: command.credentials,
region: command.region,
purpose: command.subnetType,
purpose: command.subnetTypes ? command.subnetTypes[0] : command.subnetType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we appear to be using just the first of the list to filter on when before there was only one value that mattered. What's the impact of only filtering by only one subnetType here, and could it effect the resulting vpcId in a way that prevents users from selecting valid resources later (like security groups)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users can only deploy to one VPC at a time (multiple subnets that exist in the same VPC). In this case, all of the subnets will be in the same VPC, so it shouldn't matter which subnet you take, since you're using it to get the vpc id.

command.vpcId = null;
result.dirty.vpcId = true;
} else {
const subnet = find<ISubnet>(command.backingData.subnets, {
purpose: command.subnetType,
purpose: command.subnetTypes ? command.subnetTypes[0] : command.subnetType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above re: filtering.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users can only deploy to one VPC at a time (multiple subnets that exist in the same VPC). In this case, all of the subnets will be in the same VPC, so it shouldn't matter which subnet you take, since you're using it to get the vpc id.

@piradeepk
Copy link
Contributor Author

We don't currently show any of the subnet information (I think those views still need to be built out with complete data). I'll get you some screenshots once I complete testing :)

@piradeepk piradeepk marked this pull request as draft November 16, 2020 18:33
@piradeepk
Copy link
Contributor Author

Couple questions, including this one:

  • is there anywhere in deck we need to make changes in order to correctly display multiple subnets on a service? (like cluster/LB views - these might only use VPC but want to confirm)

The views currently only display the vpc id so it's not an issue.

also can you add some test output/screenshots of:

  • the multi-select for subnetTypes working

Screen Shot 2020-12-15 at 4 57 17 PM

  • a successful deployment w/ multiple subnets (ECS console)

Screen Shot 2020-12-15 at 5 55 17 PM

  • a validation error when both subnetType and subnetTypes are used?

Screen Shot 2020-12-15 at 4 59 24 PM

Screen Shot 2020-12-15 at 4 59 29 PM

Copy link
Contributor

@allisaurus allisaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the additional screenshots :D
Approved pending approval/merge of related spinnaker/clouddriver#5087 (thx for the 'do not merge' label)

@piradeepk piradeepk changed the title feat(ecs): support multiple subnet types feat(ecs): support selecting multiple subnet types Dec 16, 2020
@piradeepk piradeepk added ready to merge Reviewed and ready for merge and removed Do Not Merge Don't merge yet labels Dec 16, 2020
@mergify mergify bot merged commit 8e2bed6 into spinnaker:master Dec 16, 2020
christopherthielen added a commit that referenced this pull request Dec 16, 2020
1d4320a refactor(REST): Prefer REST('/foo/bar') over REST().path('foo', 'bar')
97bfbf6 refactor(api-deprecation): API is deprecated, switch to REST()
39b08e7 refactor(api-deprecation): Prefer API.path('foo', 'bar') over API.path('foo').path('bar')
587db3a refactor(api-deprecation): Migrate from API.one/all/withParams/getList() to path/query/get()
8e2bed6 feat(ecs): support multiple subnet types (#8724)
mergify bot pushed a commit that referenced this pull request Dec 16, 2020
1d4320a refactor(REST): Prefer REST('/foo/bar') over REST().path('foo', 'bar')
97bfbf6 refactor(api-deprecation): API is deprecated, switch to REST()
39b08e7 refactor(api-deprecation): Prefer API.path('foo', 'bar') over API.path('foo').path('bar')
587db3a refactor(api-deprecation): Migrate from API.one/all/withParams/getList() to path/query/get()
8e2bed6 feat(ecs): support multiple subnet types (#8724)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Reviewed and ready for merge target-release/1.25
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request to support multiple subnet selection in ECS Deploy stage
3 participants