Is the I5 8400 good enough for my build?

Jun 12, 2018
1
0
10
I am currently building a new gaming computer for myself and I was wondering if the I5 8400 that I am about to buy was a bottleneck for my build. Note that I am surely going to buy a 144Hz 1440P Monitor.

The components I have already:
Palit GTX 1080 GameRock
BioStar z370 gt6
16gb ram 2666mhz
(Using Windows 10)

Is it necessary to buy a i5 8600(K) or is the I5 8400 just fine?
Thanks in advance