Skip to content

Commit

Permalink
fix(batch): windows does not support readonlyRootFilesystem (#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 #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 committed Mar 1, 2024
1 parent aa8484a commit 7205143
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.

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 7205143

Please sign in to comment.