-
Notifications
You must be signed in to change notification settings - Fork 398
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 - support setting deployment controller on a service #340
ecs_service - support setting deployment controller on a service #340
Conversation
Hi @berenddeboer, thank you for your contribution. The platform_version has been added in #353. Would you like to work with the other PR #353 to have both features integrated. Otherwise, the merge of the first PR will raise a conflict with the second one. |
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.
Thanks for this PR @berenddeboer, could you also please add a changelog fragment?
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.
Thanks for taking the time to raise this PR.
In addition to the changelog, I'm not sure that always adding the two parameters is the right behaviour.
plugins/modules/ecs_service.py
Outdated
placement_constraints, placement_strategy, health_check_grace_period_seconds, | ||
network_configuration, service_registries, launch_type, scheduling_strategy): | ||
|
||
params = dict( | ||
cluster=cluster_name, | ||
serviceName=service_name, | ||
platformVersion=platform_version, |
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.
This is going to cause an exception when platform_version isn't set (it'll default to None, which Boto3 doesn't like.)
plugins/modules/ecs_service.py
Outdated
taskDefinition=task_definition, | ||
loadBalancers=load_balancers, | ||
clientToken=client_token, | ||
role=role, | ||
deploymentController=deployment_controller, |
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.
I'm not sure if it's possible to change existing services but blindly setting this here would add new behaviour wiping out any manual configuration of a deployment controller (people sometimes work around modules not having features by using the AWS cli to tweak things.)
It seems #353 is good to go, so if that gets merged verse, I can resolve any conflicts. |
@berenddeboer this PR contains the following merge commits: Please rebase your branch to remove these commits. |
…ns#340) test/s3: keep the bucket name length under control (<63 characters) Reviewed-by: https://github.com/apps/ansible-zuul
7074613
to
7f0b51d
Compare
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
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.
I've trimmed this back to just the deployment controller. For the sake of clearing things out I think we skip the integration test requirement.
Unsupported ecs_service tests pass
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #1303 🤖 @patchback |
ecs_service - support setting deployment controller on a service SUMMARY Support setting platform version to 1.4.0 (LATEST is 1.3.0) and deployment controller. The first allows access to new 1.4.0 features. The second change allows you to create a service that can be controlled with Code Deploy. Example: - name: create a Fargate service community.aws.ecs_service: state: present name: "my-service" cluster: "my-cluster" platform_version: 1.4.0 task_definition: "my-task" desired_count: "1" launch_type: FARGATE scheduling_strategy: REPLICA deployment_controller: type: CODE_DEPLOY load_balancers: - targetGroupArn: "arn:..." containerName: example containerPort: 80 network_configuration: subnets: - "{{vpc_zone_a.subnet.id}}" - "{{vpc_zone_b.subnet.id}}" security_groups: - "sg-example" assign_public_ip: true This fixes #338. ISSUE TYPE Feature Pull Request Reviewed-by: Jill R <None> Reviewed-by: Mark Chappell <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit c9b1b02)
… (#1303) [PR #340/c9b1b02e backport][stable-4] ecs_service - support setting deployment controller on a service This is a backport of PR #340 as merged into main (c9b1b02). SUMMARY Support setting platform version to 1.4.0 (LATEST is 1.3.0) and deployment controller. The first allows access to new 1.4.0 features. The second change allows you to create a service that can be controlled with Code Deploy. Example: - name: create a Fargate service community.aws.ecs_service: state: present name: "my-service" cluster: "my-cluster" platform_version: 1.4.0 task_definition: "my-task" desired_count: "1" launch_type: FARGATE scheduling_strategy: REPLICA deployment_controller: type: CODE_DEPLOY load_balancers: - targetGroupArn: "arn:..." containerName: example containerPort: 80 network_configuration: subnets: - "{{vpc_zone_a.subnet.id}}" - "{{vpc_zone_b.subnet.id}}" security_groups: - "sg-example" assign_public_ip: true This fixes #338. ISSUE TYPE Feature Pull Request Reviewed-by: Mark Chappell <None>
SUMMARY
Support setting platform version to 1.4.0 (LATEST is 1.3.0) and deployment controller.
The first allows access to new 1.4.0 features. The second change allows you to create a service that can be controlled with Code Deploy.
Example:
This fixes #338.
ISSUE TYPE