Skip to content

Commit 7205143

Browse files
authored
fix(batch): windows does not support readonlyRootFilesystem (#29145)
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*
1 parent aa8484a commit 7205143

File tree

8 files changed

+525
-172
lines changed

8 files changed

+525
-172
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-batch/test/integ.ecs-job-definition.js.snapshot/manifest.json

+20-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-batch/test/integ.ecs-job-definition.js.snapshot/stack.assets.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-batch/test/integ.ecs-job-definition.js.snapshot/stack.template.json

+100
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,106 @@
997997
"Timeout": {},
998998
"Type": "container"
999999
}
1000+
},
1001+
"WindowsFargateContainerExecutionRoleAE15A6C1": {
1002+
"Type": "AWS::IAM::Role",
1003+
"Properties": {
1004+
"AssumeRolePolicyDocument": {
1005+
"Statement": [
1006+
{
1007+
"Action": "sts:AssumeRole",
1008+
"Effect": "Allow",
1009+
"Principal": {
1010+
"Service": "ecs-tasks.amazonaws.com"
1011+
}
1012+
}
1013+
],
1014+
"Version": "2012-10-17"
1015+
}
1016+
}
1017+
},
1018+
"WindowsFargateContainerExecutionRoleDefaultPolicyA16F3283": {
1019+
"Type": "AWS::IAM::Policy",
1020+
"Properties": {
1021+
"PolicyDocument": {
1022+
"Statement": [
1023+
{
1024+
"Action": [
1025+
"logs:CreateLogStream",
1026+
"logs:PutLogEvents"
1027+
],
1028+
"Effect": "Allow",
1029+
"Resource": {
1030+
"Fn::Join": [
1031+
"",
1032+
[
1033+
"arn:",
1034+
{
1035+
"Ref": "AWS::Partition"
1036+
},
1037+
":logs:",
1038+
{
1039+
"Ref": "AWS::Region"
1040+
},
1041+
":",
1042+
{
1043+
"Ref": "AWS::AccountId"
1044+
},
1045+
":log-group:/aws/batch/job:*"
1046+
]
1047+
]
1048+
}
1049+
}
1050+
],
1051+
"Version": "2012-10-17"
1052+
},
1053+
"PolicyName": "WindowsFargateContainerExecutionRoleDefaultPolicyA16F3283",
1054+
"Roles": [
1055+
{
1056+
"Ref": "WindowsFargateContainerExecutionRoleAE15A6C1"
1057+
}
1058+
]
1059+
}
1060+
},
1061+
"WindowsJobDefinitio0652E08A": {
1062+
"Type": "AWS::Batch::JobDefinition",
1063+
"Properties": {
1064+
"ContainerProperties": {
1065+
"Environment": [],
1066+
"ExecutionRoleArn": {
1067+
"Fn::GetAtt": [
1068+
"WindowsFargateContainerExecutionRoleAE15A6C1",
1069+
"Arn"
1070+
]
1071+
},
1072+
"FargatePlatformConfiguration": {},
1073+
"Image": "mcr.microsoft.com/dotnet/framework/runtime:4.7.2",
1074+
"NetworkConfiguration": {
1075+
"AssignPublicIp": "DISABLED"
1076+
},
1077+
"ResourceRequirements": [
1078+
{
1079+
"Type": "MEMORY",
1080+
"Value": "8192"
1081+
},
1082+
{
1083+
"Type": "VCPU",
1084+
"Value": "2"
1085+
}
1086+
],
1087+
"RuntimePlatform": {
1088+
"CpuArchitecture": "X86_64",
1089+
"OperatingSystemFamily": "WINDOWS_SERVER_2019_FULL"
1090+
}
1091+
},
1092+
"JobDefinitionName": "windows-job-definition",
1093+
"PlatformCapabilities": [
1094+
"FARGATE"
1095+
],
1096+
"RetryStrategy": {},
1097+
"Timeout": {},
1098+
"Type": "container"
1099+
}
10001100
}
10011101
},
10021102
"Parameters": {

0 commit comments

Comments
 (0)