Configurable task execution role

Configurable task execution role
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html
This commit is contained in:
Johannes Würbach
2018-04-21 00:40:32 +02:00
committed by Robbie Zhang
parent bb5dbdbd6e
commit 0a1acbc78e
5 changed files with 15 additions and 0 deletions

View File

@@ -80,6 +80,10 @@ func NewPod(cluster *Cluster, pod *corev1.Pod) (*Pod, error) {
ContainerDefinitions: []*ecs.ContainerDefinition{},
}
if cluster.executionRoleArn != "" {
taskDef.ExecutionRoleArn = aws.String(cluster.executionRoleArn)
}
// For each container in the pod...
for _, containerSpec := range pod.Spec.Containers {
// Create a container definition.