kube-aws / kube-spot-termination-notice-handler

A Kubernetes DaemonSet to gracefully delete pods 2 minutes before an EC2 Spot Instance gets terminated
Apache License 2.0
378 stars 77 forks source link

fix(aws): use JSON output instead of raw text #27

Closed andy-b-84 closed 5 years ago

andy-b-84 commented 5 years ago

AWS raw text output has been updated since this script has been written. Now the text output has 2 lines instead of 1 : thus the "awk" command used to parse its output returns a string with a linebreak and 2 lines of text. Using JSON instead of raw text makes the parsing much more easier, provided we use the jq program.

andy-b-84 commented 5 years ago

I had an old version, didn't see you requested the AWS API directly, closing this PR as it makes no sense now.