vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.
Apache License 2.0
728 stars 62 forks source link

Allow specifying kubecfg cluster within jsonnet files #273

Open steeling opened 4 years ago

steeling commented 4 years ago

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.