Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

More flexibility with merging arrays in x-aws-cloudformation overlays #2160

Open
FraserThompson opened this issue May 30, 2022 · 4 comments
Open

Comments

@FraserThompson
Copy link

Description

To workaround the lack of sidecar support in docker compose files, I had the idea of simply adding in a definition for a new container to the ContainerDefinitions array on a generated TaskDefinition via the x-aws-cloudformation overlay.

However I found that if I add an element to a YAML array in the overlay, it will replace the entire array with my override rather than appending.

It would make this feature much more powerful if there was some way to control the way the YAML is merged.

It looks like the library used for this is kyaml from kubernetes? I couldn't find any documenation so I'm not sure if this is a feature which is already here, or if this is a feature request.

@JohnPreston
Copy link

Implemented in ECS Compose-X since version 0.2, you can define a deploy label ecs.task.family that will logically group services together.
i.e.

services:
  nginx:
    deploy:
      labels:
        ecs.task.family: frontend
  some-sidecar:
    deploy:
      labels:
        ecs.task.family: frontend
  backend: {}

will automatically merge these two (nginx, some-sidecar) into the one task definition.
All details in these docs

Again, the objective here of compose-x is to remove the necessity to write CFN template for ECS services, and retain CFN syntax for every other aws resources that you want to create/use.

@stale
Copy link

stale bot commented Jan 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue label Jan 8, 2023
@tkrotoff
Copy link

Don't close stupid bot

@stale
Copy link

stale bot commented Jan 10, 2023

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale stale bot removed the stale Inactive issue label Jan 10, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants