k8s: the ca-trust publisher no longer holds multi-user.target while it waits for the setup
This commit is contained in:
parent
3213bfba7a
commit
adbe85e427
1 changed files with 14 additions and 2 deletions
|
|
@ -70,6 +70,10 @@ in
|
|||
# A pod waits in ContainerCreating until this has run. The unit has no
|
||||
# `RemainAfterExit`, so the path unit below starts it again whenever a
|
||||
# file changes.
|
||||
#
|
||||
# `Type = "simple"`: the start job is done once the script has forked, so
|
||||
# the unit never holds `multi-user.target`. The CA files come from the
|
||||
# setup, which runs after boot, and the script waits for them.
|
||||
(lib.mkIf (onCluster != [ ] && caFiles != { }) {
|
||||
systemd.services.hyperhive-k8s-ca-trust = {
|
||||
description = "publish the hive's CA files to the cluster's pods";
|
||||
|
|
@ -80,7 +84,7 @@ in
|
|||
"swarm-bao-pki.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
SyslogIdentifier = "hyperhive-k8s-ca-trust";
|
||||
|
|
|
|||
Loading…
Reference in a new issue