Skip to content

Commit

Permalink
chore(eks): log the command before invoking aws eks (#12088)
Browse files Browse the repository at this point in the history
It seems it is possible to hit a condition where `aws eks update-kubeconfig`
command may indefinitely hang: never returns until lambda is killed
by timeout.

Add debug print so that it is possible to easier localize the issue.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
valters committed Dec 15, 2020
1 parent 946db91 commit 0802c13
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ def apply_handler(event, context):
overwrite = props.get('Overwrite', False)

# "log in" to the cluster
subprocess.check_call([ 'aws', 'eks', 'update-kubeconfig',
cmd = [ 'aws', 'eks', 'update-kubeconfig',
'--role-arn', role_arn,
'--name', cluster_name,
'--kubeconfig', kubeconfig
])
]
logger.info(f'Running command: {cmd}')
subprocess.check_call(cmd)

# write resource manifests in sequence: { r1 }{ r2 }{ r3 } (this is how
# a stream of JSON objects can be included in a k8s manifest).
Expand Down

0 comments on commit 0802c13

Please sign in to comment.