Skip to content

Commit

Permalink
configure all access entries explicitly to avoid duplicate entry when…
Browse files Browse the repository at this point in the history
… creating pet clusters
  • Loading branch information
linki committed Sep 20, 2024
1 parent bde2ecf commit dee8d0b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cluster/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Resources:
IpFamily: "{{.Cluster.ConfigItems.eks_ip_family}}"
AccessConfig:
AuthenticationMode: API
#BootstrapClusterCreatorAdminPermissions: false
BootstrapClusterCreatorAdminPermissions: false
EncryptionConfig:
- Provider:
KeyArn: !GetAtt EtcdEncryptionKey.Arn # TODO: maybe use another key for EKS?
Expand Down Expand Up @@ -181,6 +181,17 @@ Resources:
ClusterName: !Ref EKSCluster
PrincipalArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/{{.Cluster.LocalID}}-worker"
Type: "EC2_LINUX"
EKSAccessEntryClusterLifecycleManagerAuth:
Type: "AWS::EKS::AccessEntry"
Properties:
AccessPolicies:
- AccessScope:
Type: "cluster"
PolicyArn: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
ClusterName: !Ref EKSCluster
PrincipalArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/cluster-lifecycle-manager-entrypoint"
Username: !Sub "arn:aws:sts::${AWS::AccountId}:assumed-role/cluster-lifecycle-manager-entrypoint/{{`{{SessionName}}`}}"
Type: "STANDARD"
EKSAccessEntryZalandoIAMAuth:
Type: "AWS::EKS::AccessEntry"
Properties:
Expand Down

0 comments on commit dee8d0b

Please sign in to comment.