Skip to content

Commit a35f5ce

Browse files
committed
fix roles
Signed-off-by: Katyanna Moura <[email protected]>
1 parent b125bf0 commit a35f5ce

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

cluster/cluster.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,23 @@ Resources:
455455
Path: /
456456
RoleName: "{{.Cluster.LocalID}}-e2e-cdp"
457457
Type: 'AWS::IAM::Role'
458+
E2EEKSIAMTestAccessEntryCDP:
459+
Type: "AWS::EKS::AccessEntry"
460+
Properties:
461+
AccessPolicies:
462+
- AccessScope:
463+
Type: "cluster"
464+
PolicyArn: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
465+
ClusterName: !Ref EKSCluster
466+
PrincipalArn: !GetAtt E2EEKSIAMTestCDP.Arn
467+
Username: !Join
468+
- ''
469+
- - !Sub 'arn:aws:sts::${AWS::AccountId}:assumed-role/'
470+
- !Ref E2EEKSIAMTestCDP
471+
- '/{{`{{SessionName}}`}}'
472+
KubernetesGroups:
473+
- zalando:cdp
474+
Type: "STANDARD"
458475
E2EEKSIAMTestDeploymentService:
459476
Properties:
460477
AssumeRolePolicyDocument:
@@ -468,6 +485,24 @@ Resources:
468485
Version: 2012-10-17
469486
Path: /
470487
RoleName: "{{.Cluster.LocalID}}-e2e-deployment-service"
488+
Type: 'AWS::IAM::Role'
489+
E2EEKSIAMTestAccessEntryDeploymentService:
490+
Type: "AWS::EKS::AccessEntry"
491+
Properties:
492+
AccessPolicies:
493+
- AccessScope:
494+
Type: "cluster"
495+
PolicyArn: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
496+
ClusterName: !Ref EKSCluster
497+
PrincipalArn: !GetAtt E2EEKSIAMTestDeploymentService.Arn
498+
Username: !Join
499+
- ''
500+
- - !Sub 'arn:aws:sts::${AWS::AccountId}:assumed-role/'
501+
- !Ref E2EEKSIAMTestDeploymentService
502+
- '/{{`{{SessionName}}`}}'
503+
KubernetesGroups:
504+
- zalando:deployment-service
505+
Type: "STANDARD"
471506
{{ end }}
472507
# TODO: IAM POLICY
473508
EKSCNIIPv6Policy:

0 commit comments

Comments
 (0)