mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-29 14:27:12 +02:00
security: restrict k3s kubeconfig file mode to 600
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
}:
|
||||
lib.genAttrs (builtins.attrNames outputs.nixosConfigurations) (name: {
|
||||
# Only the control-plane (master) nodes write the admin kubeconfig; agents
|
||||
# (workers) connect to the master and have no --write-kubeconfig-* flags.
|
||||
mode600 = lib.hasInfix "-master-" name;
|
||||
mode644 = false;
|
||||
})
|
||||
Reference in New Issue
Block a user