Skip to content

Commit

Permalink
Merge pull request #7451 from teraflik/patch-1
Browse files Browse the repository at this point in the history
Update well-known policy for ebsCSIController
  • Loading branch information
yuxiang-zhang committed Jan 22, 2024
2 parents 37cc928 + b4b8935 commit b4d258d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
14 changes: 1 addition & 13 deletions pkg/cfn/builder/iam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,18 +545,6 @@ const expectedEbsPolicyDocument = `{
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"ec2:CreateVolume"
],
"Condition": {
"StringLike": {
"aws:RequestTag/kubernetes.io/cluster/*": "owned"
}
},
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"ec2:DeleteVolume"
Expand Down Expand Up @@ -587,7 +575,7 @@ const expectedEbsPolicyDocument = `{
],
"Condition": {
"StringLike": {
"ec2:ResourceTag/kubernetes.io/cluster/*": "owned"
"ec2:ResourceTag/kubernetes.io/created-for/pvc/name": "*"
}
},
"Effect": "Allow",
Expand Down
14 changes: 1 addition & 13 deletions pkg/cfn/builder/statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,6 @@ func ebsStatements() []cft.MapOfInterfaces {
},
},
},
{
"Effect": "Allow",
"Action": []string{
"ec2:CreateVolume",
},
"Resource": "*",
"Condition": cft.MapOfInterfaces{
"StringLike": cft.MapOfInterfaces{
"aws:RequestTag/kubernetes.io/cluster/*": "owned",
},
},
},
{
"Effect": "Allow",
"Action": []string{
Expand Down Expand Up @@ -502,7 +490,7 @@ func ebsStatements() []cft.MapOfInterfaces {
"Resource": "*",
"Condition": cft.MapOfInterfaces{
"StringLike": cft.MapOfInterfaces{
"ec2:ResourceTag/kubernetes.io/cluster/*": "owned",
"ec2:ResourceTag/kubernetes.io/created-for/pvc/name": "*",
},
},
},
Expand Down

0 comments on commit b4d258d

Please sign in to comment.