Skip to content

Commit

Permalink
[ECS] Support 5 missing fields in TaskDefinition (#5424)
Browse files Browse the repository at this point in the history
* Add missing fields in RegisterTaskDef

Signed-off-by: t-kikuc <[email protected]>

* remove two restrictions

Signed-off-by: t-kikuc <[email protected]>

---------

Signed-off-by: t-kikuc <[email protected]>
  • Loading branch information
t-kikuc authored Dec 16, 2024
1 parent 5e1a7f5 commit 0e4fbc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,6 @@ There are some restrictions in configuring a service definition file.

There are some restrictions in configuring a task definition file.

- `placementConstraints` is not supported.
- `proxyConfiguration` is not supported.
- `tags` is not supported.

### ECSTargetGroupInput
Expand Down
8 changes: 7 additions & 1 deletion pkg/app/piped/platformprovider/ecs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,15 @@ func (c *client) RegisterTaskDefinition(ctx context.Context, taskDefinition type
Volumes: taskDefinition.Volumes,
RuntimePlatform: taskDefinition.RuntimePlatform,
EphemeralStorage: taskDefinition.EphemeralStorage,
// Requires defined at task level in case Fargate is used.
// Cpu and Memory must be defined if Fargate is used.
Cpu: taskDefinition.Cpu,
Memory: taskDefinition.Memory,

InferenceAccelerators: taskDefinition.InferenceAccelerators,
IpcMode: taskDefinition.IpcMode,
PidMode: taskDefinition.PidMode,
PlacementConstraints: taskDefinition.PlacementConstraints,
ProxyConfiguration: taskDefinition.ProxyConfiguration,
// TODO: Support tags for registering task definition.
}
output, err := c.ecsClient.RegisterTaskDefinition(ctx, input)
Expand Down

0 comments on commit 0e4fbc0

Please sign in to comment.