Can gay people join the military?

As of 2011, gay people can freely join the US military and do not have to hide their orientation.