If you upload a JPEG direct from the camera, the lens info will not be shown.
If you run it through Lightroom--JPEG or RAW--then it will show, as long as Lightroom recognizes the lens. It does so with all Pentax lenses but I've found that it can't peg Sigma lenses, at least not without help. If you go to load a profile and merely select "Manufacturer: Sigma," then it will auto identify the lens (or has with the two I've owned).
You can adjust the lens name directly with Windows Explorer. Right click the image -> properties and you can view EXIF. There's a section for "Lens Model" and Manufacturer. You can fill those in and that is what will show up in Flickr. I do this because I don't like the formatting of the lens name Flickr uses (it's Pentax's official one but I think it looks goofy).