Almost by definition it is legal, unless  you are alleging some sort of implicit government discrimination (e.g. white areas get better parking than African American areas): the municipality determines the parking laws, rules, spots, etc., and unless they are doing something contradicted by a higher law (the way racial discrimination in the assignment of parking spots or enforcement of parking laws would be illegal), anything they do is legal, since they make the rules.