Skip to content

Commit

Permalink
Merge pull request #2163 from ConnorJC3/update-policy
Browse files Browse the repository at this point in the history
Update example policy for IAM change
  • Loading branch information
k8s-ci-robot authored Oct 2, 2024
2 parents 945321b + 34ddb93 commit 1f52666
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
11 changes: 9 additions & 2 deletions docs/example-iam-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Resource": "arn:aws:ec2:*:*:volume/*",
"Condition": {
"StringLike": {
"aws:RequestTag/ebs.csi.aws.com/cluster": "true"
Expand All @@ -54,13 +54,20 @@
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Resource": "arn:aws:ec2:*:*:volume/*",
"Condition": {
"StringLike": {
"aws:RequestTag/CSIVolumeName": "*"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateVolume"
],
"Resource": "arn:aws:ec2:*:*:snapshot/*"
},
{
"Effect": "Allow",
"Action": [
Expand Down
13 changes: 4 additions & 9 deletions hack/e2e/kops/patch-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Resource": "arn:aws:ec2:*:*:volume/*",
"Condition": {
"StringLike": {
"aws:RequestTag/ebs.csi.aws.com/cluster": "true"
Expand All @@ -78,7 +78,7 @@ spec:
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Resource": "arn:aws:ec2:*:*:volume/*",
"Condition": {
"StringLike": {
"aws:RequestTag/CSIVolumeName": "*"
Expand All @@ -90,12 +90,7 @@ spec:
"Action": [
"ec2:CreateVolume"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/kubernetes.io/cluster/*": "owned"
}
}
"Resource": "arn:aws:ec2:*:*:snapshot/*"
},
{
"Effect": "Allow",
Expand Down Expand Up @@ -129,7 +124,7 @@ spec:
"Resource": "*",
"Condition": {
"StringLike": {
"ec2:ResourceTag/kubernetes.io/cluster/*": "owned"
"ec2:ResourceTag/kubernetes.io/created-for/pvc/name": "*"
}
}
},
Expand Down

0 comments on commit 1f52666

Please sign in to comment.