Applying for another job within same department?
This seems to me to depend on personalities more than anything. You need to make a judgement about the reaction of your boss. Most people, IMO, would support you in any career advancement. Giving early notice, in most situations, is beneficial, as it lets them know that they may need to search for a replacement or otherwise arrange schedules, etc. 

Putting your options out, as you have here (fantastic opportunity, career goals...) would probably be a good way to approach it. I don't think anyone expects you will remain a post-doc forever. 

If your boss is a reasonable person, then it would seem to me that s/he would be happy for you, and happy that if you get the new position that you will still be available for consultation and that your expertise won't be lost. 

There are exceptions, of course, even beyond personality. If one is working with highly sensitive information, for example, it might be necessary to escort them off premises immediately on hearing that they might be leaving. But the situations in which you would need to hide your application would, to me, be rare. 

Finally, I think that the issue of same department has no real world meaning in such a decision. For example, most people would celebrate a move from post-doc to tenure track faculty.