forge icon indicating copy to clipboard operation
forge copied to clipboard

creating namespaces in your manifests is awkward

Open rhs opened this issue 7 years ago • 1 comments

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.

rhs avatar Jan 25 '18 16:01 rhs

@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?

mumoshu avatar Jan 26 '18 03:01 mumoshu