Is pyrite (FeS₂) an ionic or a covalent compound?
You seem to have fallen into the trap of thinking that ionic and covalent bonds are fundamentally different. They are not - they are just two ends of a spectrum, which has an arbitrary division somewhere in the middle into an ionic and covalent regime. This is explained in the answers to this question.

In the case of pyrite we have a relatively hard cation, with a small ionic radius and charge of +2, and a rather large anion, with a charge of -2. Therefore there will be a significant degree of covalent character in the Fe-S bonds due to the polarising effect of the cation on the anion. This is confirmed by experimental results and theoretical calculations which suggest that the charge on Fe is about +2/3 and the charge on S is about -1/3. This is significantly less than the expected charges of +2 and -1 from a purely ionic model and so indicates that there is significant sharing of electrons. This is supported by measurements and calculations of the electron density, which show significant electron density between the atoms.

Reference: http://pubs.rsc.org/en/content/articlepdf/2014/sc/c3sc52977k