Use a 1/16" endmill to mill the channels for folding as well as the overall profile. Polypropylene is the ideal material as it will bend without cracking or breaking.
Use this EASEL link
Use a 1/8" endmill to cut your cap pieces. I used 1/2" red HDPE for its bright color and durability, but this could be any material that is tough enough to hold the polypropylene in shape. Choose whatever color/material you like best.
Use this EASEL link
Start the folds in the polypropylene by hand. If the material is too stiff you can use clamps to squeeze and hold it in shape while you put on the endcaps. Remove the clamps and the material will expand to hold the endcaps securely on. No glue is needed, although you can certainly add some for an even more secure fit.