We propose and experimentally demonstrate an approach to generate triangular-shaped microwave signals based on optical polarization processing and stimulated Brillouin amplification, using a polarization modulator (PolM) and a fiber Brillouin amplifier. The odd-and even-order optical sidebands become polarized in mutually orthogonal directions by external modulating a continuous-wave laser light using the PolM. Then the odd-order optical sidebands are selected by a polarizer while the even-order optical sidebands are suppressed. Moreover, the power ratio of the odd-order optical sidebands is controlled by adjusting the modulation index. To generate triangular waveforms, an optical carrier recovery process is implemented by jointly controlling the direction α of the polarizer transmission axis and the amplification effect from the stimulated Brillouin scattering. After photodetection, Fourier harmonics are produced by beating the amplified optical carrier with the odd-order optical sidebands, which synthesizes triangular-shaped microwave waveforms. The effect of α on the generated waveform is analyzed theoretically and demonstrated experimentally. In the proof-of-concept experiment, triangular-shaped microwave signals with small root-mean-square error at repetition frequencies of 10, 11, and 12 GHz are successfully generated, demonstrating flexible tunability and excellent waveforms.