wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
322 stars 58 forks source link

Check if annotations is undefined #22

Closed chribsen closed 6 years ago

chribsen commented 6 years ago

Before trying to access the annotations object, we should always if it's undefined (because the annotations map is optional in the Pod manifest). This commit adds a check that will short circuit the if statement in case that annotations is evaluated to be falsey (e.g. undefined)

Fixes: #21

whs commented 6 years ago

v3.2.1 is now on Docker Hub :tada: Thanks for the fix!