Skip to content

Commit

Permalink
fix(batch): windows does not support readonlyRootFilesystem (aws#29145)
Browse files Browse the repository at this point in the history
Here's from the k8s docs:
```
securityContext.readOnlyRootFilesystem - not possible on Windows; write access is required for registry & system processes to run inside the container
```

Closes aws#29140. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
msambol authored and godwingrs22 committed Mar 1, 2024
1 parent 4b34151 commit c2fa827
Show file tree
Hide file tree
Showing 8 changed files with 525 additions and 172 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,106 @@
"Timeout": {},
"Type": "container"
}
},
"WindowsFargateContainerExecutionRoleAE15A6C1": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "ecs-tasks.amazonaws.com"
}
}
],
"Version": "2012-10-17"
}
}
},
"WindowsFargateContainerExecutionRoleDefaultPolicyA16F3283": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow",
"Resource": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":logs:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":log-group:/aws/batch/job:*"
]
]
}
}
],
"Version": "2012-10-17"
},
"PolicyName": "WindowsFargateContainerExecutionRoleDefaultPolicyA16F3283",
"Roles": [
{
"Ref": "WindowsFargateContainerExecutionRoleAE15A6C1"
}
]
}
},
"WindowsJobDefinitio0652E08A": {
"Type": "AWS::Batch::JobDefinition",
"Properties": {
"ContainerProperties": {
"Environment": [],
"ExecutionRoleArn": {
"Fn::GetAtt": [
"WindowsFargateContainerExecutionRoleAE15A6C1",
"Arn"
]
},
"FargatePlatformConfiguration": {},
"Image": "mcr.microsoft.com/dotnet/framework/runtime:4.7.2",
"NetworkConfiguration": {
"AssignPublicIp": "DISABLED"
},
"ResourceRequirements": [
{
"Type": "MEMORY",
"Value": "8192"
},
{
"Type": "VCPU",
"Value": "2"
}
],
"RuntimePlatform": {
"CpuArchitecture": "X86_64",
"OperatingSystemFamily": "WINDOWS_SERVER_2019_FULL"
}
},
"JobDefinitionName": "windows-job-definition",
"PlatformCapabilities": [
"FARGATE"
],
"RetryStrategy": {},
"Timeout": {},
"Type": "container"
}
}
},
"Parameters": {
Expand Down

0 comments on commit c2fa827

Please sign in to comment.