Watch
0
0
Fork
You've already forked hyperhive
0

require k8s: swarm services with a pod run in the cluster only

This commit is contained in:
atlas 2026-11-26 00:36:09 +01:00 • committed by mara
commit 052b559196

View file

@ -36,21 +36,23 @@ let
# a unit's ExecStart names which option it read. Nothing else reads them.
marker = name: pkgs.runCommand "auth-marker-${name}" { } "mkdir $out";
# The all-local host with the k3s node on, and the controller's TCP listener
# that a controller in the cluster needs and the one on the host serves as
# well. It does not set `k8s.enable`: the node turns the rendering on.
k8sNodeSettings = {
# The all-local host: every swarm service in its cluster, which the mode turns
# on, and the controller's TCP listener that the controller's pod is reached
# through.
allLocalSettings = {
deploy.singleHostSwarm = true;
deploy.k8s.enable = true;
deploy.k8s.address = "192.168.1.10";
deploy.k8s.nodeAddresses = [
"192.168.1.11"
"192.168.1.12"
];
deploy.victorialogs.authPackage = marker "logs";
deploy.victorialogs.grafanaAuthPackage = marker "logs-grafana";
deploy.victoriametrics.authPackage = marker "metrics";
deploy.victoriametrics.agentAuthPackage = marker "metrics-agent";
swarm.controller.tcp = {
enable = true;
domain = "controller.t.local";
};
};
allLocal = hiveWithController allLocalSettings;
in
{
agentBare = agent { };
@ -61,18 +63,10 @@ in
bareWithController = hiveWithController { };
# With the k8s manifests rendered too, which changes no unit.
allLocal = hiveWithController {
deploy.singleHostSwarm = true;
k8s.enable = true;
deploy.victorialogs.authPackage = marker "logs";
deploy.victorialogs.grafanaAuthPackage = marker "logs-grafana";
deploy.victoriametrics.authPackage = marker "metrics";
deploy.victoriametrics.agentAuthPackage = marker "metrics-agent";
};
inherit allLocal;
inherit k8sNodeSettings;
k8sNode = hiveWithController k8sNodeSettings;
k8sNodeSettings = allLocalSettings;
k8sNode = allLocal;
autheliaOnly = hive { deploy.authelia.enable = true; };