How should military discipline be balanced with religious freedom within the armed forces?

The Supreme Court is considering whether military discipline should override religious freedom for soldiers. I want to understand the complexities involved in maintaining discipline while respecting individual rights in a diverse country like India.