2+1D Chern Simons Level Quantization With a $SU(N)_k$ or $U(N)_{k,k}$ Chern-Simons term written as
$$\mathcal{L} = \frac{k}{4\pi} \left(AdA + \frac{2i}{3} A^3\right)$$
it is often stated that $k\in \mathbb{Z}$. Usually, I see this coming out as a result of flux quantization, though to do this they place the theory on a closed manifold (such as $S^1\times S^2$). 


*

*Under what precise conditions is $k\in \mathbb{Z}$ required? If I have an open manifold, say $\mathbb{R}^3$, must $k$ still be quantized? 

*I have also heard that the particulars of the level quantization depends on if the manifold is spin or non-spin (or $\text{spin}_c$). Why does this matter?
 A: Comments to OP's first subquestion (v3):


*

*The Chern-Simons (CS) action $S[A]$ is always invariant under infinitesimal gauge transformations. If we require the CS Boltzmann factor to be invariant under large gauge transformations $g:M\to G$, then the level $k$ has to be quantized. See also e.g. G.V. Dunne, Aspects of Chern-Simons Theory, arXiv:hep-th/9902115, eq. (58).

*One should ensure that the CS Lagrangian density is integrable, so that the action $S[A]$ is well-defined and finite. This in turn put restrictions on allowed gauge potentials $A$ and allowed gauge transformations $g$, in particular if the 2+1D spacetime $M$ is a non-compact manifold. Typically one would impose that $A$ and $g$ should vanish sufficiently fast at "infinity", i.e. essentially one-point compactify the manifold.
A: Chern-Simon action is classically not gauge invariant. Under $A_\mu \rightarrow A^g_\mu=g A_\mu g^{-1} - \partial_\mu g g^{-1}$, the Lagrangian transforms as
$\mathcal{L}_{CS} \rightarrow \mathcal{L}_{CS} + \frac{k}{4\pi} \epsilon^{\mu\nu\alpha} \partial_\mu\ Tr(\partial_\nu g g ^{-1} A_\alpha) + \frac{k}{12\pi} \epsilon^{\mu\nu\alpha}\ Tr(g^{-1}\partial_\mu g g^{-1}\partial_\nu g g^{-1}\partial_\alpha g)$.
The second term is a total derivative that vanishes. The last term however, does not vanish. Up to a constant, the integral of this term is called the winding number $\omega(g)$, given by
$\omega(g)=\frac{1}{24\pi^2}\int d^3x\ \epsilon^{\mu\nu\alpha}\ Tr(g^{-1}\partial_\mu g g^{-1}\partial_\nu g g^{-1}\partial_\alpha g)$.
$\omega(g)$ is an integer called the winding number. Now, we can write 
$S_{CS}(A) \rightarrow S_{CS}(A^g) = S_{CS}(A) + 2\pi k \omega(g)$.
Chern-Simons action is classically not gauge invariant but it can be made gauge invariant at the quantum level by constraining $k$ to be an integer. In that case, the weight of the path integral $e^{iS_{CS}}$ does not change, thus the theory becomes gauge invariant. The integer $k$ is usually referred to as the "level number" of Chern-Simons theory. 
