unique namespace per lab
hellt opened this issue · comments
Currently, clabverter uses clabernetes
namespace for the resources created for every clab file.
I think it makes sense to create a unique namespace per each lab as it:
- makes it easy to remove the lab and its artifacts with a single swipe:
k del ns foo
- isolates lab resources in the cluster, which makes it easy to list resources belonging to a lab
- simplifies visualization in tools like
k9s
The namespace name can be bluntly derived from the clab's .name
attribute plus c9s
prefix. For example for a given clab file:
name: mylab
topology:
nodes:
# snip
clabverter can create a namespace named c9s-mylab
making a homage to clab's prefix naming convention that would have been clab-mylab
.
I think we already have a namespace flag in clabverter -- so basically have that take precedence over this but otherwise do this auto magic handling?
@carlmontanari I can work on that.
the scope of work I see ahead is:
- get the lab name out of the clab file
- compute that
c9s-<lab-name>
namespace - set this value as a namespace of clabverter