0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-12 05:16:25 +03:00

nixos/kubernetes: Address review: Separate preStart from certificates

This commit is contained in:
Christian Albrecht 2019-03-06 16:52:27 +01:00
parent 52fe1d2e7a
commit 7323b77435
No known key found for this signature in database
GPG key ID: 866AF4B25DF7EB00
6 changed files with 39 additions and 34 deletions

View file

@ -53,11 +53,10 @@ in
before = [ "node-online.target" ];
path = with pkgs; [ iptables conntrack_tools ];
preStart = ''
${top.lib.mkWaitCurl (with top.pki.certs.kubeProxyClient; {
${top.lib.mkWaitCurl ( with config.systemd.services.kube-proxy; {
path = "/api/v1/nodes/${top.kubelet.hostname}";
cacert = top.caFile;
inherit cert key;
})}
} // optionalAttrs (environment ? cert) { inherit (environment) cert key; })}
'';
serviceConfig = {
Slice = "kubernetes.slice";