Open rhs opened 6 years ago
@rhs Just curious(=not believing it's the solution), but could we upsert a namespace from within a "ns-only" forge service, and then make all the other forge services depend on the "ns-only" service? Are you referring to that case, right?
If you want your resources to be created in a namespace, you need to put that namespace at the top of all your yaml files. This is not only awkward, but it runs into a race condition if you happen to use the same namespace across separate services.
The race occurs if you run a single forge deploy command that includes the separate services when the namespace does not yet exist. Because apply performs an "upsert" by doing a query on the client and deciding whether to do a create or update, the two clients will end up racing.