hive-tls: a gateway host without the services-issuer pair evaluates and goes red at runtime
Drop the eval assertion b78190e1 added. It refused every self-signed gateway host that does not run the store, which is the default hive shape, and contradicts docs/swarm/secrets.md's supported no-store deployment. The approved #4921 plan has such a host evaluate and fail at runtime; `requireServicesIssuer` already exits 1 naming both options, on the root-fetch branch and before issuing. The module-eval case that pinned `hiveWithController { }` as refused now pins it, and a hive-less gateway with no pair, as evaluating with the unit's refusal in the script. The fixture pairs the assertion forced into forge-placement, nats-tls and swarm-otel-identity are reverted. Refs #4921
This commit is contained in:
parent
5761398d60
commit
6a9c819136
7 changed files with 37 additions and 52 deletions
|
|
@ -333,30 +333,6 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf active {
|
||||
assertions = [
|
||||
{
|
||||
assertion = haveServicesIssuer;
|
||||
message = ''
|
||||
services.hyperhive.gateway serves the self-signed leaf on this host,
|
||||
which needs the swarm-services issuer's store identity: set both
|
||||
|
||||
services.hyperhive.deploy.bao.servicesIssuerClientCertFile
|
||||
services.hyperhive.deploy.bao.servicesIssuerClientKeyFile
|
||||
|
||||
swarm-services-cert.service presents it to ask the swarm secret
|
||||
store for the swarm-services leaf and to fetch the store's pki root.
|
||||
|
||||
Both default to the pair glue-bao-tls.nix mints when
|
||||
services.hyperhive.deploy.bao.enable is true (the host that runs
|
||||
the store). Otherwise copy services-issuer.pem and
|
||||
services-issuer-key.pem from the store host's /var/lib/swarm-bao-pki/
|
||||
and name them in those two options, or give the gateway a
|
||||
certificate of its own (services.hyperhive.gateway.tls.certDir or
|
||||
services.hyperhive.gateway.tls.acme.enable).
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
# The state dir and the trust bundle. Never waits on the store: the
|
||||
# store's container is ordered after this unit, which writes the
|
||||
# bundle it bind-mounts, so the leaf is `hive-tls-resign`'s.
|
||||
|
|
|
|||
|
|
@ -1967,8 +1967,9 @@ in
|
|||
`pki/issue/swarm-services` and nothing else, and it is the same on
|
||||
every gateway host, whether or not a hive runs there.
|
||||
|
||||
Required on every host whose gateway serves the self-signed leaf;
|
||||
unset fails evaluation.
|
||||
Required on every host whose gateway serves the self-signed leaf.
|
||||
Unset, the host evaluates and `swarm-services-cert` fails, naming
|
||||
both options.
|
||||
|
||||
./glue-bao-tls.nix points it at the leaf it mints on the store's host.
|
||||
On a gateway host without the store, it is a file the operator copies
|
||||
|
|
|
|||
Loading…
Reference in a new issue