File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 11PROJECT = concourse-helm3
2- ID = YOUR_DOCKER_HOST_HERE /${PROJECT}
2+ ID = artielabs /${PROJECT}
33VERSION = $(shell cat VERSION)
44
55
Original file line number Diff line number Diff line change 1- 1.38.2
1+ 1.38.3
Original file line number Diff line number Diff line change @@ -157,15 +157,25 @@ setup_aws_kubernetes() {
157157 secret_access_key=${secret_access_key}
158158 fi
159159
160- # user credentail will be persisted on the disk under a specific profile
160+ # user credentials will be persisted on the disk under a specific profile
161161 # in order to call `aws eks get-token`
162162 mkdir -p ~ /.aws
163163 echo " [${profile:- default} ]
164164 aws_access_key_id=${access_key_id}
165165 aws_secret_access_key=${secret_access_key}
166166 region=${region} " > ~ /.aws/credentials
167167
168- aws eks update-kubeconfig --region ${region} --name ${cluster_name} ${profile_opt}
168+ # If the role arn is provided, we will create a separate profile for the role.
169+ if [ -n " $role_arn " ]; then
170+ echo " [assume_role]
171+ role_arn=${role_arn}
172+ source_profile=${profile:- default} " > ~ /.aws/credentials
173+
174+ aws eks update-kubeconfig --region ${region} --name ${cluster_name} --profile assume_role
175+ else
176+ aws eks update-kubeconfig --region ${region} --name ${cluster_name} ${profile_opt}
177+ fi
178+
169179 else
170180 # defaults to use instance identity.
171181 echo " no role or user specified. Fallback to use identity of the instance e.g. instance profile) to set up kubeconfig"
You can’t perform that action at this time.
0 commit comments