Specifying the cluster context within jsonnet files mitigates risk of pushing the wrong file to the wrong cluster, potentially overwriting kubernetes resources in a destructive way.
This could be done in the walk method, and looking for a top level field with a specific name, or we could place metadata within a configmap in a special namespace and with a special name.
We could default the name to something like "cluster-metadata", and allow overriding via a flag.
Specifying the cluster context within jsonnet files mitigates risk of pushing the wrong file to the wrong cluster, potentially overwriting kubernetes resources in a destructive way.
This could be done in the walk method, and looking for a top level field with a specific name, or we could place metadata within a configmap in a special namespace and with a special name.
We could default the name to something like "cluster-metadata", and allow overriding via a flag.