swarm: move both metric stores' package to deploy, and cover their shims
Same rule as matrix and grafana: which build a service runs is a decision of the host that runs it. Both stores already had a `deploy.<store>` option for retention, so the package joins something rather than opening a namespace. The prose in both modules claimed the package as part of "what the store IS from any hive's point of view" — a client hive needs the domain and the port to reach a store, never the build it runs. deploy.nix's own comment made the same claim about the pair and is corrected with them. Separately, and the reason this commit adds a fixture rather than a line: NEITHER STORE HAD AN OLD-PATH FIXTURE AT ALL. `swarm.victorialogs.` and `swarm.victoriametrics.` had zero hits in module-eval.nix, so the `enable` shims from the first slice and both `retentionPeriod` shims have been uncovered since they landed — the suite would have gone green with any of them deleted. That is precisely what the wireguard fixture's own comment warns about: a missing shim reads as a clean tree and breaks every existing operator config. `storesOldPath` therefore sets all six old paths, not just the two this commit moves. The case reads the package the CONTAINER renders rather than the option, so a shim that resolves but stops reaching the module fails too. Refs #3772.
This commit is contained in:
parent
0002c15dc3
commit
e091add37a
4 changed files with 61 additions and 24 deletions
|
|
@ -56,17 +56,11 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
# What stays here is what the store IS from any hive's point of view: its
|
||||
# package, the name it answers on, the port. `enable` and `retentionPeriod`
|
||||
# are decisions of the host that runs it and live under `deploy.*`.
|
||||
# What stays here is what the store IS from any hive's point of view: the
|
||||
# name it answers on and the port. `enable`, `package` and
|
||||
# `retentionPeriod` are decisions of the host that runs it and live under
|
||||
# `deploy.*`.
|
||||
options.services.hyperhive.swarm.victorialogs = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.victorialogs;
|
||||
defaultText = lib.literalExpression "pkgs.victorialogs";
|
||||
description = "VictoriaLogs package to run.";
|
||||
};
|
||||
|
||||
machine = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
readOnly = true;
|
||||
|
|
@ -116,6 +110,13 @@ in
|
|||
# and a hive that is a *client* of the log store never consults it. That
|
||||
# makes it a `deploy.*` value by the same rule as the seal on the secret
|
||||
# store — options on the auto-deployed service itself.
|
||||
options.services.hyperhive.deploy.victorialogs.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.victorialogs;
|
||||
defaultText = lib.literalExpression "pkgs.victorialogs";
|
||||
description = "VictoriaLogs package to run.";
|
||||
};
|
||||
|
||||
options.services.hyperhive.deploy.victorialogs.retentionPeriod = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "30d";
|
||||
|
|
@ -259,7 +260,7 @@ in
|
|||
|
||||
services.victorialogs = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
package = deployCfg.victorialogs.package;
|
||||
|
||||
# ⚠️ PINNED TO LOOPBACK for the same reason the metrics store is,
|
||||
# and it matters more here: upstream's default listens on every
|
||||
|
|
|
|||
Loading…
Reference in a new issue