Wiggling flag as armature animation to export

Hi guys!
For a game I’d like to create a flag with a wiggling animation. Usually one would use either the soft body modifier or a cloth simulation for this, but I need to have this as an armature animation.
I don’t know how to go about this, specifically about the bone settings. I only have experience using FK, I don’t know if IK is recommended here.
I kind of have the feeling that there is supposed to be some neat trick for this, I just don’t know what it is.

Thanks in advance for any help and suggestions!