Most Linux distributions do that by default today, Ubuntu included.
It is definitely one of those things where the default case has been made to cover everything and has gotten really complicated.
But the upgrade tool really should be smart enough to clean up the oldest kernels when /boot gets full. That's pretty sad if they haven't fixed that yet.