mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat: initial work on metacontroller
This commit is contained in:
parent
978ada4312
commit
4b96377e42
5 changed files with 202 additions and 0 deletions
36
modules/metacontroller/default.nix
Normal file
36
modules/metacontroller/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../k8s.nix ];
|
||||
|
||||
options.metacontroller = {
|
||||
compositeControllers = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
imports = [ ./compositecontroller.nix ];
|
||||
|
||||
options = {
|
||||
name = mkOption {
|
||||
description = "Name of the composite controller";
|
||||
type = types.str;
|
||||
default = name;
|
||||
};
|
||||
};
|
||||
}));
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
kubernetes.customResources = [{
|
||||
group = "metacontroller.k8s.io";
|
||||
version = "v1alpha1";
|
||||
kind = "CompositeController";
|
||||
resource = "compositecontrollers";
|
||||
description = "Composite controller";
|
||||
alias = "compositecontrollers";
|
||||
module.imports = [ ./compositecontroller.nix ];
|
||||
}];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue