Skip to content

Commit ec3f23b

Browse files
authored
feat: add permissions for karpenter (#105)
## Motivation For support karpenter on AWS environment. --------- Signed-off-by: Max Xu <xuhuan@live.cn>
1 parent 55280ad commit ec3f23b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

modules/aws/vendor-access/files/permission_boundary_iam_policy.json.tpl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Action": [
88
"acm:*",
99
"autoscaling:*",
10+
"cloudwatch:*",
1011
"cognito-idp:*",
1112
"dynamodb:*",
1213
"ec2:*",
@@ -17,12 +18,16 @@
1718
"iam:List*",
1819
"kms:*",
1920
"logs:*",
21+
"pricing:*",
2022
"route53:*",
23+
"route53domains:*",
2124
"s3:*",
2225
"servicequotas:*",
2326
"shield:*",
24-
"support:*",
27+
"sqs:*",
28+
"ssm:*",
2529
"sts:*",
30+
"support:*",
2631
"waf-regional:*",
2732
"wafv2:*"
2833
],
@@ -36,6 +41,7 @@
3641
"iam:CreateOpenIDConnectProvider",
3742
"iam:CreateServiceLinkedRole",
3843
"iam:CreatePolicy*",
44+
"iam:CreateInstanceProfile",
3945
"iam:DeleteInstanceProfile",
4046
"iam:DeleteOpenIDConnectProvider",
4147
"iam:DeletePolicy*",
@@ -91,18 +97,21 @@
9197
}
9298
},
9399
{
94-
"Sid": "RestrictPassRoleToEKS",
100+
"Sid": "RestrictPassRole",
95101
"Effect": "Allow",
96102
"Action": [
97103
"iam:PassRole"
98104
],
99105
"Resource": [
100106
"arn:${partition}:iam::${account_id}:role/${cluster_pattern}",
101-
"arn:${partition}:iam::${account_id}:role/StreamNative/${cluster_pattern}"
107+
"arn:${partition}:iam::${account_id}:role/StreamNative/*"
102108
],
103109
"Condition": {
104110
"StringEquals": {
105-
"iam:PassedToService": "eks.amazonaws.com"
111+
"iam:PassedToService": [
112+
"ec2.amazonaws.com",
113+
"eks.amazonaws.com"
114+
]
106115
}
107116
}
108117
},

modules/aws/vendor-access/files/provision2.json.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
"iam:AddRoleToInstanceProfile",
195195
"iam:CreateRole",
196196
"iam:CreatePolicy*",
197+
"iam:CreateInstanceProfile",
197198
"iam:DeleteInstanceProfile",
198199
"iam:DeleteOpenIDConnectProvider",
199200
"iam:DeleteRole*",

0 commit comments

Comments
 (0)