run the log store and its auth responders as pods
swarm-logs-auth and swarm-metrics-auth take --listen for a TCP address beside --socket. The log store is a Deployment on a static local volume that is its old container's data directory, behind a ClusterIP Service the gateway dials by name. Its two auth_request responders are one unpinned pod with a jwt role. The renderer gains a plain HTTP listener, a probe path, fsGroupChangePolicy, and one policy for a pod with both a listener and egress.
This commit is contained in:
parent
279f97e5ca
commit
71b2e9310c
1 changed files with 1385 additions and 746 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# The swarm's log store as every hive sees it: the name it answers on and its
|
||||
# port, identical on every host. What the host running it decides, and the
|
||||
# container itself, are in ./swarm-victorialogs.nix.
|
||||
# The swarm's log store as every hive sees it: the name it answers on,
|
||||
# identical on every host. What the host running it decides, and its pods, are
|
||||
# in ./swarm-victorialogs.nix.
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
|
|
@ -16,37 +16,10 @@ let
|
|||
domainBase = if swarmDomain == null then "invalid" else swarmDomain;
|
||||
in
|
||||
{
|
||||
# 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.*`.
|
||||
# What the store IS from any hive's point of view: the name it answers on.
|
||||
# `enable`, `package` and `retentionPeriod` are decisions of the host that runs
|
||||
# it and live under `deploy.*`.
|
||||
options.services.hyperhive.swarm.victorialogs = {
|
||||
machine = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
readOnly = true;
|
||||
default = "swarm-victorialogs";
|
||||
description = ''
|
||||
Container name. Read-only: the name appears in host paths and in
|
||||
`machinectl`, so it is a fact other modules may read rather than a
|
||||
knob.
|
||||
'';
|
||||
};
|
||||
|
||||
otel.clientId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
readOnly = true;
|
||||
default = "swarm-victorialogs-collector";
|
||||
description = ''
|
||||
OAuth2 client id the journal forwarder inside the log store's
|
||||
container authenticates as, and the audience it asks its token for.
|
||||
|
||||
Read-only because three hosts have to agree on it: authelia
|
||||
registers the client (`glue-victorialogs-otel-oidc-client.nix`),
|
||||
the swarm collector admits it on the container's receiver
|
||||
(`swarm.otel.serviceProducers`), and authelia's mint stores
|
||||
its secret in the store.
|
||||
'';
|
||||
};
|
||||
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "logs.${domainBase}";
|
||||
|
|
@ -61,6 +34,5 @@ in
|
|||
registered for that to actually happen.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue