-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hardcoded ARN partitions #12638
Fix hardcoded ARN partitions #12638
Conversation
8d14896
to
e0fea1f
Compare
/retest |
98e5e40
to
0bd7348
Compare
@@ -32,7 +32,7 @@ var _ iam.Subject = &ServiceAccount{} | |||
func (r *ServiceAccount) BuildAWSPolicy(b *iam.PolicyBuilder) (*iam.Policy, error) { | |||
clusterName := b.Cluster.ObjectMeta.Name | |||
p := iam.NewPolicy(clusterName) | |||
iam.AddCCMPermissions(p, b.Cluster.Spec.Networking.Kubenet != nil) | |||
iam.AddCCMPermissions(p, b.Partition, b.Cluster.Spec.Networking.Kubenet != nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to pass the partition into NewPolicy()
instead of having to pass it to every Add*Permissions()
call?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…38-origin-release-1.22 Automated cherry pick of #12638: Fix hardcoded ARN partitions
IAMBuilder was hardcoding the partition in ARNs to
aws
in IAM Policy documents for OIDC Providers, EBS Volumes, and EBS Snapshots. This fixes them to use the current partition (aws-test
in integration tests). This also fixes a few ARNs generated in cloudmock and updates any ARNs referenced in cluster manifests as well.The end goal is that there are no ARNs with
aws
partitions in any of the integration test inputs or outputs so they can be validated for support for alternative partitions via #12635.Fixes #12633