Required for the morphogenesis and for the elongation of the flagellar filament by facilitating polymerization of the flagellin monomers at the tip of growing filament. Forms a capping structure, which prevents flagellin subunits (transported through the central channel of the flagellum) from leaking out without polymerization at the distal end. Essential to colonize and establish infection in gastric mucosa as a result of its essential role in motility. Has effect on flaA gene transcription. Homopentamer. Belongs to the FliD family.