cluster/k/l/cockroach: make publicService select *all* nodes

Change-Id: I705b89057f9c191eb62771e3683224376b2207a1
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1762
Reviewed-by: q3k <q3k@hackerspace.pl>
changes/62/1762/2
implr 2023-11-02 00:28:27 +01:00 committed by implr
parent c783390cf5
commit 6f1fda4329
1 changed files with 10 additions and 1 deletions

View File

@ -163,7 +163,16 @@ local policies = import "../../../kube/policies.libsonnet";
publicService: kube.Service(cluster.name("public")) {
metadata+: cluster.metadata,
target_pod:: cluster.servers[0].deploy.spec.template,
target_pod:: cluster.servers[0].deploy.spec.template + {
// no easy way to *drop* a field in jsonnet: https://github.com/google/jsonnet/issues/312
// so hide it (the :: is critical, the null doesn't matter much)
metadata+: {
labels+: {
// this is different for each node, so we want to *not* select on it
"kubernetes.hackerspace.pl/cockroachdb-server":: null,
}
}
},
spec+: {
ports: [
{ name: "grpc", port: cluster.cfg.portServe, targetPort: cluster.cfg.portServe },