I have several k8s_object
rules in my project and I supply each of them with the same cluster
name like this:
k8s_object(
name = "k8s_service",
kind = "service",
cluster = "gke_cents-ideas_europe-west3-b_cents-ideas",
template = ":gateway.service.yaml",
)
So whenever I want to change the cluster name, I have to change it in many different places.
Goal
I would prefer to set the cluster name in a .env
file like this:
KUBERNETES_CLUSTER=my-cluster-name
and let Bazel automatically pick up this value.