File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,16 @@ else
283283fi
284284log " Memory reservation updated"
285285
286+ # Container Memory reservation
287+ if [ -z $AWS_ECS_CONTAINER_CPU ];
288+ then
289+ echo " No cpu defined . Going with default value 100"
290+ AWS_ECS_CONTAINER_CPU=100
291+ template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
292+ else
293+ template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
294+ fi
295+
286296# Port Mapping
287297Buffer_portmap=$( echo $AWS_ECS_PORTS | sed ' s/,/ /g' )
288298for b1 in $Buffer_portmap ;
@@ -379,15 +389,6 @@ else
379389 # CONTAINER_CPU
380390 ECS_NETWORKTYPE=" bridge"
381391 template=$( echo $template | jq --arg networkMode $ECS_NETWORKTYPE ' .networkMode=$networkMode' )
382- # Container Memory reservation
383- if [ -z $AWS_ECS_CONTAINER_CPU ];
384- then
385- echo " No cpu defined . Going with default value 100"
386- AWS_ECS_CONTAINER_CPU=100
387- template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
388- else
389- template=$( echo $template | jq --argjson cpu $AWS_ECS_CONTAINER_CPU ' .containerDefinitions[0].cpu=$cpu' )
390- fi
391392
392393 # Updating the compatibiltiy
393394 template=$( echo $template | jq --arg requiresCompatibilities EC2 ' .requiresCompatibilities[0] = $requiresCompatibilities' )
You can’t perform that action at this time.
0 commit comments