Cook the spaghetti according to package instructions. Drain and set aside.
Heat olive oil in a large skillet over medium heat.
Sauté the red onion for 3-4 minutes until soft, then add the garlic and cook for another 30 seconds.
Add cherry tomatoes and cook until they begin to burst, about 5 minutes.
Stir in Kalamata olives, oregano, crushed red pepper flakes (if using), salt, and black pepper.
Add the cooked spaghetti to the skillet and toss everything together.
Remove from heat and sprinkle with crumbled feta and fresh parsley before serving.