-
Notifications
You must be signed in to change notification settings - Fork 395
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
ecs_service -- Capacity provider strategy #1181
ecs_service -- Capacity provider strategy #1181
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
changelogs/fragments/1181-ecs_service_capacity_provider_strategy.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karcadia thanks for your contribution.
at first glance it looks good so far. can you also expand the integration test tests/integration/targets/ecs_cluster/
that covers the new parameter?
...any better rebase your branch before touching the integration test. :) |
Add requested feature for capacity provider strategy. Capacity Provider Strategy is mutually exclusive with launch_type and a given service cannot be changed from one to the other. Possibly still needs: Camel <=> Snake casing for the subelements of capacity_provider_strategy. Catch if provided list has more than 6 elements and fail cleanly.
…gy.yml Co-authored-by: Markus Bergholz <git@osuv.de>
Co-authored-by: Markus Bergholz <git@osuv.de>
Co-authored-by: Markus Bergholz <git@osuv.de>
63fac9b
to
e6a328e
Compare
So the integration test might not be possible until ecs_cluster.py supports capacityProviders. I believe it has to be defined in the ecs_cluster before it can be used in an ecs_service provider strategy. I can probably add that as well, not sure if we are concerned about expanding the scope of this PR too much. We should probably go ahead and add defaultCapacityProviderStrategy to ecs_cluster while we're at it. |
Good point. I guess it needs also a new module
Yes, +1, keep the scope small. +1 |
Linting cleanup SUMMARY Minor linting cleanup missing whitespace unused variables catching Exception unused imports in kms_key also replaces get_account_info with module_utils.iam.get_aws_account_info ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/inventory/aws_ec2.py plugins/module_utils/cloud.py plugins/modules/autoscaling_group.py plugins/modules/cloudtrail_info.py plugins/modules/cloudwatchlogs_log_group.py plugins/modules/ec2_eip.py plugins/modules/kms_key_info.py plugins/modules/lambda.py plugins/modules/lambda_execute.py plugins/modules/rds_cluster_snapshot.py plugins/modules/rds_instance.py plugins/modules/rds_instance_snapshot.py plugins/modules/route53_health_check.py plugins/modules/s3_object_info.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
SUMMARY
Fixes #1137
Per request, allow for the user to provide a capacity_provider_strategy when creating or updating an ECS service. This capacity_provider_strategy is a list of 1-6 dictionaries. The new capacity_provider_strategy is mutually exclusive with launch_type and an existing service cannot be changed from one to the other.
ISSUE TYPE
COMPONENT NAME
ecs_service
ADDITIONAL INFORMATION
The new parameter is optional and non-default. If neither launch_type or capacity_provider_strategy are provided, the new service will default to EC2 launch_type. The module handles the mutually exclusivity and also catches and fails cleanly when trying to change an existing service from launch_type to capacity_provider_strategy or vice versa.
Tested pretty thoroughly against ansible 2.9.27. Updated parameters, examples, and return objects provided.
Before merge the module will just ignore the capacity_provider_strategy and default to EC2 launch_type.
After merge the module will handle either launch_type or capacity_provider_strategy and create/update the service as necessary.