forked from hswaw/hscloud
cluster: k0: move cockroachdb away from bc01n01, fixup joins
Reminded by a power failure on bc01n0{1,2}, we migrate away from at least one of them into another server. We also fix up the startup join parameter to not include the node itself (which is not necessary, but a nice thing to have nonetheless). Since bc01n01 was the initial node of the cluster, we also disable the init job for k0 (which we don't care about anyway). Change-Id: I3406471c0f9542e9d802d39138e400b5a5e74794 Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1176 Reviewed-by: q3k <q3k@hackerspace.pl>
This commit is contained in:
parent
8469691645
commit
bdd403c587
2 changed files with 10 additions and 2 deletions
|
@ -64,9 +64,9 @@ local rook = import "lib/rook.libsonnet";
|
|||
waw2: cockroachdb.Cluster("crdb-waw1") {
|
||||
cfg+: {
|
||||
topology: [
|
||||
{ name: "bc01n01", node: "bc01n01.hswaw.net" },
|
||||
{ name: "bc01n02", node: "bc01n02.hswaw.net" },
|
||||
{ name: "dcr01s22", node: "dcr01s22.hswaw.net" },
|
||||
{ name: "dcr01s24", node: "dcr01s24.hswaw.net" },
|
||||
],
|
||||
// Host path on SSD.
|
||||
hostPath: "/var/db/crdb-waw1",
|
||||
|
@ -74,6 +74,7 @@ local rook = import "lib/rook.libsonnet";
|
|||
"crdb-waw1.hswaw.net",
|
||||
],
|
||||
},
|
||||
initJob:: null,
|
||||
},
|
||||
clients: {
|
||||
cccampix: k0.cockroach.waw2.Client("cccampix"),
|
||||
|
|
|
@ -215,6 +215,13 @@ local policies = import "../../../kube/policies.libsonnet";
|
|||
},
|
||||
},
|
||||
spec+: {
|
||||
strategy+: {
|
||||
type: "RollingUpdate",
|
||||
rollingUpdate: {
|
||||
maxSurge: 0,
|
||||
maxUnavailable: 1,
|
||||
},
|
||||
},
|
||||
template+: {
|
||||
metadata: server.deploy.metadata,
|
||||
spec+: {
|
||||
|
@ -287,7 +294,7 @@ local policies = import "../../../kube/policies.libsonnet";
|
|||
"--certs-dir", "/cockroach/cockroach-certs",
|
||||
"--advertise-host", "%s.cluster.local" % server.service.host,
|
||||
"--cache", "25%", "--max-sql-memory", "25%",
|
||||
"--join", std.join(",", ["%s.cluster.local:%d" % [s.service.host, cluster.cfg.portServe] for s in cluster.servers]),
|
||||
"--join", std.join(",", ["%s.cluster.local:%d" % [s.service.host, cluster.cfg.portServe] for s in cluster.servers if s.service.host != server.service.host]),
|
||||
"--listen-addr=0.0.0.0:%d" % cluster.cfg.portServe,
|
||||
"--http-addr=0.0.0.0:%d" % cluster.cfg.portHttp,
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue