Likewise, if you get hired by Amazon in Cape Town, it's illegal. In South Africa non-competes are only legally valid for top-tier exec-level positions, and even then maybe not.
For example, if the company pays you your old salary for a year after you leave, the non-compete with be enforceable.
If they just part ways with no reasonable exchange of value for the non-compete period, all you have to claim is this is how you make your crust.
Those folk have a serious legal consititution.