mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 09:01:04 +01:00
kubeswitch: add module
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
92db5be8e1
commit
af8a884164
10 changed files with 220 additions and 0 deletions
35
tests/modules/programs/kubeswitch/example-settings.nix
Normal file
35
tests/modules/programs/kubeswitch/example-settings.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
programs.kubeswitch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
kind = "SwitchConfig";
|
||||
version = "v1alpha1";
|
||||
kubeconfigName = "*.myconfig";
|
||||
kubeconfigStores = [
|
||||
{
|
||||
kind = "filesystem";
|
||||
kubeconfigName = "*.myconfig";
|
||||
paths = [
|
||||
"~/.kube/my-other-kubeconfigs/"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.kube/switch-config.yaml \
|
||||
${builtins.toFile "example-settings-expected.yaml" ''
|
||||
kind: SwitchConfig
|
||||
kubeconfigName: '*.myconfig'
|
||||
kubeconfigStores:
|
||||
- kind: filesystem
|
||||
kubeconfigName: '*.myconfig'
|
||||
paths:
|
||||
- ~/.kube/my-other-kubeconfigs/
|
||||
version: v1alpha1
|
||||
''}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue