admiraltyio / admiralty

A system of Kubernetes controllers that intelligently schedules workloads across clusters.
https://admiralty.io
Apache License 2.0
673 stars 87 forks source link

add nil validation for webhook #194

Closed kirillmakhonin-brt closed 10 months ago

kirillmakhonin-brt commented 1 year ago

This PR adds validation in webhook to check that NodeSelector and Tolerations are not nil before iterating over them

kirillmakhonin-brt commented 1 year ago

@adrienjt could you please review this Pull Request?

adrienjt commented 1 year ago

Iterating over nil maps and slices isn't a problem in Go: https://go.dev/play/p/wSL9dI2qdui