From 9c870ac78f6157260ba1f96f9ce077ce84478532 Mon Sep 17 00:00:00 2001 From: "vincent.cui" Date: Thu, 21 Dec 2023 22:08:31 +0100 Subject: [PATCH] nixos/kubernetes: fix pki's mkSpec function The `authority.file.path` field of a cert spec is [defined as follows] (https://github.com/cloudflare/certmgr/tree/v3.0.3#pki-specs): > if this is included, the CA certificate will be saved here. It follows the same file specification format above. Use this if you want to save your CA cert to disk. So certmgr fails, because each certmgr spec (apiserver, addonManager, ...) wants to manage the file at the `cert.caCert` location. However, the `authority.file.path` field is not needed for generating a certificate, as the certificate is generated by the CA, which is reachable at `authority.remote` (e.g. https://localhost:8888 with `easyCerts = true`). The `authority.file.path` field just saves the certificate of the CA to disk. --- nixos/modules/services/cluster/kubernetes/pki.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix index 35151ebd6bd7..4573d9ec2137 100644 --- a/nixos/modules/services/cluster/kubernetes/pki.nix +++ b/nixos/modules/services/cluster/kubernetes/pki.nix @@ -220,7 +220,6 @@ in inherit (cert) action; authority = { inherit remote; - file.path = cert.caCert; root_ca = cert.caCert; profile = "default"; auth_key_file = certmgrAPITokenPath;