If we have an orientable manifold $M$ with a metric $g$ and signature $(r, s)$, we can define the principal-$SO(r, s)$ bundle $SO(M)$, the bundle of orthonormal frames of $TM$. This is a subset of the principal-$GL(n, \mathbb{R})$ bundle $Fr(M)$, the frame bundle of $M$.
As a Koszul connection $\nabla$, any such connection is metric compatible. That is, for all $X, Y, Z \in \mathrm{Vect}(M)$, we have
$$X g(Y, Z) = g(\nabla_X Y, Z) + g(Y, \nabla_Z X).$$
My question is this: how can we prove that all connections on the bundle $SO(M)$ are metric compatible?