mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
deadnix check
This commit is contained in:
parent
e0d7a66cdc
commit
890b84be5e
23 changed files with 162 additions and 242 deletions
|
|
@ -25,7 +25,7 @@ with lib; let
|
|||
|
||||
moduleToAttrs = value:
|
||||
if isAttrs value
|
||||
then mapAttrs (n: v: moduleToAttrs v) (filterAttrs (n: v: v != null && !(hasPrefix "_" n)) value)
|
||||
then mapAttrs (_n: v: moduleToAttrs v) (filterAttrs (n: v: v != null && !(hasPrefix "_" n)) value)
|
||||
else if isList value
|
||||
then map (v: moduleToAttrs v) value
|
||||
else value;
|
||||
|
|
@ -38,7 +38,7 @@ with lib; let
|
|||
|
||||
defaults = mkOption {
|
||||
description = "Kubernetes defaults to apply to resources";
|
||||
type = types.listOf (types.submodule ({config, ...}: {
|
||||
type = types.listOf (types.submodule ({ ...}: {
|
||||
options = {
|
||||
group = mkOption {
|
||||
description = "Group to apply default to (all by default)";
|
||||
|
|
@ -258,7 +258,7 @@ with lib; let
|
|||
getSubOptions = finalType.getSubOptions;
|
||||
getSubModules = finalType.getSubModules;
|
||||
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
|
||||
typeMerge = t1: t2: null;
|
||||
typeMerge = _t1: _t2: null;
|
||||
functor = (defaultFunctor name) // {wrapped = finalType;};
|
||||
};
|
||||
in
|
||||
|
|
@ -405,7 +405,7 @@ in {
|
|||
_m.propagate = [
|
||||
{
|
||||
features = ["k8s"];
|
||||
module = {config, ...}: {
|
||||
module = { ...}: {
|
||||
# propagate kubernetes version and namespace
|
||||
kubernetes.version = mkDefault cfg.version;
|
||||
kubernetes.namespace = mkDefault cfg.namespace;
|
||||
|
|
@ -485,7 +485,7 @@ in {
|
|||
kubernetes.objects = flatten (mapAttrsToList
|
||||
(
|
||||
_: type:
|
||||
mapAttrsToList (name: resource: moduleToAttrs resource)
|
||||
mapAttrsToList (_name: resource: moduleToAttrs resource)
|
||||
cfg.api.resources.${type.group}.${type.version}.${type.kind}
|
||||
)
|
||||
cfg.api.types);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue