deadnix check

This commit is contained in:
GTrunSec 2022-04-02 13:41:07 -07:00
parent e0d7a66cdc
commit 890b84be5e
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
23 changed files with 162 additions and 242 deletions

View file

@ -1,5 +1,4 @@
{ {
config,
lib, lib,
pkgs, pkgs,
kubenix, kubenix,

View file

@ -38,7 +38,7 @@
modules ? [module], modules ? [module],
... ...
}: let }: let
lib' = lib.extend (lib: self: import ./lib/upstreamables.nix {inherit lib pkgs;}); lib' = lib.extend (lib: _self: import ./lib/upstreamables.nix {inherit lib pkgs;});
attrs' = builtins.removeAttrs attrs ["module"]; attrs' = builtins.removeAttrs attrs ["module"];
in in
lib'.evalModules (lib.recursiveUpdate lib'.evalModules (lib.recursiveUpdate
@ -77,9 +77,6 @@
mkExamples = attrs: mkExamples = attrs:
(import ./examples {inherit evalModules;}) (import ./examples {inherit evalModules;})
({registry = "docker.io/gatehub";} // attrs); ({registry = "docker.io/gatehub";} // attrs);
mkK8STests = attrs:
(import ./tests {inherit evalModules;})
({registry = "docker.io/gatehub";} // attrs);
in { in {
# TODO: access "success" derivation with nice testing utils for nice output # TODO: access "success" derivation with nice testing utils for nice output
nginx-example = wasSuccess (mkExamples {}).nginx-deployment.config.testing; nginx-example = wasSuccess (mkExamples {}).nginx-deployment.config.testing;
@ -91,7 +88,7 @@
)) ))
// { // {
nixosModules.kubenix = import ./modules; nixosModules.kubenix = import ./modules;
overlays.default = final: prev: { overlays.default = _final: prev: {
kubenix.evalModules = self.evalModules.${prev.system}; kubenix.evalModules = self.evalModules.${prev.system};
# up to date versions of their nixpkgs equivalents # up to date versions of their nixpkgs equivalents
# kubernetes = # kubernetes =

View file

@ -73,7 +73,7 @@ with lib; let
then types.attrs then types.attrs
else throw "type ${def.type} not supported"; else throw "type ${def.type} not supported";
submoduleOf = definitions: ref: ''(submoduleOf "${ref}")''; submoduleOf = _definitions: ref: ''(submoduleOf "${ref}")'';
submoduleForDefinition = ref: name: kind: group: version: ''(submoduleForDefinition "${ref}" "${name}" "${kind}" "${group}" "${version}")''; submoduleForDefinition = ref: name: kind: group: version: ''(submoduleForDefinition "${ref}" "${name}" "${kind}" "${group}" "${version}")'';
@ -91,7 +91,7 @@ with lib; let
genDefinitions = swagger: genDefinitions = swagger:
with gen; (mapAttrs with gen; (mapAttrs
( (
name: definition: _name: definition:
# if $ref is in definition it means it's an alias of other definition # if $ref is in definition it means it's an alias of other definition
if hasAttr "$ref" definition if hasAttr "$ref" definition
then definitions."${refDefinition definition}" then definitions."${refDefinition definition}"
@ -194,19 +194,19 @@ with lib; let
optionalProps = optionalProps =
filterAttrs filterAttrs
( (
propName: property: propName: _property:
!(elem propName (definition.required or [])) !(elem propName (definition.required or []))
) )
definition.properties; definition.properties;
in in
mapAttrs (name: property: mkOverride 1002 null) optionalProps; mapAttrs (_name: _property: mkOverride 1002 null) optionalProps;
} }
) )
swagger.definitions); swagger.definitions);
genResources = swagger: genResources = swagger:
(mapAttrsToList (mapAttrsToList
(name: property: rec { (_name: property: rec {
splittedType = splitString "." (removePrefix "me.snowdrop.istio.api." property.javaType); splittedType = splitString "." (removePrefix "me.snowdrop.istio.api." property.javaType);
group = (concatStringsSep "." (take ((length splittedType) - 2) splittedType)) + ".istio.io"; group = (concatStringsSep "." (take ((length splittedType) - 2) splittedType)) + ".istio.io";
kind = removeSuffix "Spec" (last splittedType); kind = removeSuffix "Spec" (last splittedType);
@ -215,13 +215,13 @@ with lib; let
}) })
(filterAttrs (filterAttrs
( (
name: property: _name: property:
(hasPrefix "me.snowdrop.istio.api" property.javaType) (hasPrefix "me.snowdrop.istio.api" property.javaType)
&& hasSuffix "Spec" property.javaType && hasSuffix "Spec" property.javaType
) )
swagger.properties)) swagger.properties))
++ (mapAttrsToList ++ (mapAttrsToList
(name: property: rec { (_name: property: rec {
splittedType = splitString "." (removePrefix "me.snowdrop.istio.mixer." property.javaType); splittedType = splitString "." (removePrefix "me.snowdrop.istio.mixer." property.javaType);
group = "config.istio.io"; group = "config.istio.io";
version = "v1alpha2"; version = "v1alpha2";
@ -230,7 +230,7 @@ with lib; let
}) })
(filterAttrs (filterAttrs
( (
name: property: _name: property:
(hasPrefix "me.snowdrop.istio.mixer" property.javaType) (hasPrefix "me.snowdrop.istio.mixer" property.javaType)
&& hasSuffix "Spec" property.javaType && hasSuffix "Spec" property.javaType
) )

View file

@ -74,7 +74,7 @@ with lib; let
then types.attrs then types.attrs
else throw "type ${def.type} not supported"; else throw "type ${def.type} not supported";
submoduleOf = definitions: ref: ''(submoduleOf "${ref}")''; submoduleOf = _definitions: ref: ''(submoduleOf "${ref}")'';
submoduleForDefinition = ref: name: kind: group: version: ''(submoduleForDefinition "${ref}" "${name}" "${kind}" "${group}" "${version}")''; submoduleForDefinition = ref: name: kind: group: version: ''(submoduleForDefinition "${ref}" "${name}" "${kind}" "${group}" "${version}")'';
@ -111,7 +111,7 @@ with lib; let
with gen; with gen;
mapAttrs mapAttrs
( (
name: definition: _name: definition:
# if $ref is in definition it means it's an alias of other definition # if $ref is in definition it means it's an alias of other definition
if hasAttr "$ref" definition if hasAttr "$ref" definition
then definitions."${refDefinition definition}" then definitions."${refDefinition definition}"
@ -209,12 +209,12 @@ with lib; let
optionalProps = optionalProps =
filterAttrs filterAttrs
( (
propName: property: propName: _property:
!(elem propName (definition.required or [])) !(elem propName (definition.required or []))
) )
definition.properties; definition.properties;
in in
mapAttrs (name: property: mkOverride 1002 null) optionalProps; mapAttrs (_name: _property: mkOverride 1002 null) optionalProps;
} }
) )
swagger.definitions; swagger.definitions;
@ -271,7 +271,7 @@ with lib; let
}) })
(filterAttrs (filterAttrs
( (
name: path: _name: path:
hasAttr "post" path hasAttr "post" path
&& path.post."x-kubernetes-action" == "post" && path.post."x-kubernetes-action" == "post"
) )
@ -282,7 +282,7 @@ with lib; let
resourceTypes = genResourceTypes swagger; resourceTypes = genResourceTypes swagger;
resourceTypesByKind = zipAttrs (mapAttrsToList resourceTypesByKind = zipAttrs (mapAttrsToList
(name: resourceType: { (_name: resourceType: {
${resourceType.kind} = resourceType; ${resourceType.kind} = resourceType;
}) })
resourceTypes); resourceTypes);
@ -290,7 +290,7 @@ with lib; let
resourcesTypesByKindSortByVersion = resourcesTypesByKindSortByVersion =
mapAttrs mapAttrs
( (
kind: resourceTypes: _kind: resourceTypes:
reverseList (sort reverseList (sort
( (
r1: r2: r1: r2:
@ -301,13 +301,11 @@ with lib; let
resourceTypesByKind; resourceTypesByKind;
latestResourceTypesByKind = latestResourceTypesByKind =
mapAttrs (kind: resources: last resources) resourcesTypesByKindSortByVersion; mapAttrs (_kind: resources: last resources) resourcesTypesByKindSortByVersion;
genResourceOptions = resource: genResourceOptions = resource:
with gen; let with gen; let
submoduleForDefinition' = definition: let submoduleForDefinition' = definition: submoduleForDefinition
in
submoduleForDefinition
definition.ref definition.ref
definition.name definition.name
definition.kind definition.kind

View file

@ -26,7 +26,7 @@ with lib; let
builtins.readFile builtins.readFile
(pkgs.runCommand "value-to-b64" {} "echo -n '${value}' | ${pkgs.coreutils}/bin/base64 -w0 > $out"); (pkgs.runCommand "value-to-b64" {} "echo -n '${value}' | ${pkgs.coreutils}/bin/base64 -w0 > $out");
exp = base: exp: foldr (value: acc: acc * base) 1 (range 1 exp); exp = base: exp: foldr (_value: acc: acc * base) 1 (range 1 exp);
octalToDecimal = value: octalToDecimal = value:
(foldr (foldr

View file

@ -1,5 +1,4 @@
{ {
config,
lib, lib,
... ...
}: }:
@ -19,7 +18,7 @@ with lib; {
_m.propagate = mkOption { _m.propagate = mkOption {
description = "Module propagation options"; description = "Module propagation options";
type = types.listOf (types.submodule ({config, ...}: { type = types.listOf (types.submodule ({ ...}: {
options = { options = {
features = mkOption { features = mkOption {
description = "List of features that submodule has to have to propagate module"; description = "List of features that submodule has to have to propagate module";

View file

@ -87,8 +87,6 @@ in {
{ {
features = ["docker"]; features = ["docker"];
module = { module = {
config,
name,
... ...
}: { }: {
# propagate registry options # propagate registry options

View file

@ -42,7 +42,7 @@ with lib; let
getSubOptions = finalType.getSubOptions; getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules; getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null; typeMerge = _t1: _t2: null;
functor = (defaultFunctor name) // {wrapped = finalType;}; functor = (defaultFunctor name) // {wrapped = finalType;};
}; };
}; };
@ -62,7 +62,7 @@ with lib; let
values); values);
submoduleOf = ref: submoduleOf = ref:
types.submodule ({name, ...}: { types.submodule ({ ...}: {
options = definitions."${ref}".options or {}; options = definitions."${ref}".options or {};
config = definitions."${ref}".config or {}; config = definitions."${ref}".config or {};
}); });
@ -234,7 +234,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -454,7 +454,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -660,7 +660,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -882,7 +882,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -1148,7 +1148,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentNumberScheduled" = mkOption { "currentNumberScheduled" = mkOption {
@ -1367,7 +1367,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"observedGeneration" = mkOption { "observedGeneration" = mkOption {
@ -1547,7 +1547,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -1760,7 +1760,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentReplicas" = mkOption { "currentReplicas" = mkOption {
@ -4094,7 +4094,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"failed" = mkOption { "failed" = mkOption {
@ -5421,7 +5421,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"kind" = mkOption { "kind" = mkOption {
@ -5662,7 +5662,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -5698,7 +5698,7 @@ with lib; let
"containerPort"); "containerPort");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"readinessProbe" = mkOption { "readinessProbe" = mkOption {
@ -5744,7 +5744,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -5754,7 +5754,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -6267,7 +6267,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -6345,7 +6345,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -6355,7 +6355,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -7311,7 +7311,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -7599,7 +7599,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"allocatable" = mkOption { "allocatable" = mkOption {
@ -7617,7 +7617,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"config" = mkOption { "config" = mkOption {
@ -7953,7 +7953,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -8515,7 +8515,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"dnsConfig" = mkOption { "dnsConfig" = mkOption {
@ -8538,7 +8538,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostAliases" = mkOption { "hostAliases" = mkOption {
@ -8547,7 +8547,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostIPC" = mkOption { "hostIPC" = mkOption {
@ -8573,7 +8573,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"initContainers" = mkOption { "initContainers" = mkOption {
@ -8583,7 +8583,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"nodeName" = mkOption { "nodeName" = mkOption {
@ -8670,7 +8670,7 @@ with lib; let
"topologyKey"); "topologyKey");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumes" = mkOption { "volumes" = mkOption {
@ -8679,7 +8679,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -8730,7 +8730,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"containerStatuses" = mkOption { "containerStatuses" = mkOption {
@ -8776,7 +8776,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"qosClass" = mkOption { "qosClass" = mkOption {
@ -9232,7 +9232,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -9877,7 +9877,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -10045,7 +10045,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"publishNotReadyAddresses" = mkOption { "publishNotReadyAddresses" = mkOption {
@ -14614,7 +14614,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -15168,7 +15168,7 @@ with lib; let
coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name"; coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -17299,7 +17299,7 @@ with lib; let
"io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid"); "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"resourceVersion" = mkOption { "resourceVersion" = mkOption {
@ -17735,7 +17735,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -17910,7 +17910,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };

View file

@ -42,7 +42,7 @@ with lib; let
getSubOptions = finalType.getSubOptions; getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules; getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null; typeMerge = _t1: _t2: null;
functor = (defaultFunctor name) // {wrapped = finalType;}; functor = (defaultFunctor name) // {wrapped = finalType;};
}; };
}; };
@ -62,7 +62,7 @@ with lib; let
values); values);
submoduleOf = ref: submoduleOf = ref:
types.submodule ({name, ...}: { types.submodule ({ ...}: {
options = definitions."${ref}".options or {}; options = definitions."${ref}".options or {};
config = definitions."${ref}".config or {}; config = definitions."${ref}".config or {};
}); });
@ -234,7 +234,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -454,7 +454,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -660,7 +660,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -882,7 +882,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -1288,7 +1288,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentNumberScheduled" = mkOption { "currentNumberScheduled" = mkOption {
@ -1507,7 +1507,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"observedGeneration" = mkOption { "observedGeneration" = mkOption {
@ -1687,7 +1687,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -1900,7 +1900,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentReplicas" = mkOption { "currentReplicas" = mkOption {
@ -4352,7 +4352,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"failed" = mkOption { "failed" = mkOption {
@ -5679,7 +5679,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"kind" = mkOption { "kind" = mkOption {
@ -5920,7 +5920,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -5956,7 +5956,7 @@ with lib; let
"containerPort"); "containerPort");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"readinessProbe" = mkOption { "readinessProbe" = mkOption {
@ -6002,7 +6002,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -6012,7 +6012,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -6525,7 +6525,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -6603,7 +6603,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -6613,7 +6613,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -7574,7 +7574,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -7862,7 +7862,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"allocatable" = mkOption { "allocatable" = mkOption {
@ -7880,7 +7880,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"config" = mkOption { "config" = mkOption {
@ -8216,7 +8216,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -8778,7 +8778,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"dnsConfig" = mkOption { "dnsConfig" = mkOption {
@ -8801,7 +8801,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostAliases" = mkOption { "hostAliases" = mkOption {
@ -8810,7 +8810,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostIPC" = mkOption { "hostIPC" = mkOption {
@ -8836,7 +8836,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"initContainers" = mkOption { "initContainers" = mkOption {
@ -8846,7 +8846,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"nodeName" = mkOption { "nodeName" = mkOption {
@ -8933,7 +8933,7 @@ with lib; let
"topologyKey"); "topologyKey");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumes" = mkOption { "volumes" = mkOption {
@ -8942,7 +8942,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -8993,7 +8993,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"containerStatuses" = mkOption { "containerStatuses" = mkOption {
@ -9039,7 +9039,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"qosClass" = mkOption { "qosClass" = mkOption {
@ -9521,7 +9521,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -10166,7 +10166,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -10353,7 +10353,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"publishNotReadyAddresses" = mkOption { "publishNotReadyAddresses" = mkOption {
@ -10417,7 +10417,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"loadBalancer" = mkOption { "loadBalancer" = mkOption {
@ -15473,7 +15473,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -16070,7 +16070,7 @@ with lib; let
coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name"; coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -18247,7 +18247,7 @@ with lib; let
"io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid"); "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"resourceVersion" = mkOption { "resourceVersion" = mkOption {
@ -18683,7 +18683,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -18858,7 +18858,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };

View file

@ -42,7 +42,7 @@ with lib; let
getSubOptions = finalType.getSubOptions; getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules; getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null; typeMerge = _t1: _t2: null;
functor = (defaultFunctor name) // {wrapped = finalType;}; functor = (defaultFunctor name) // {wrapped = finalType;};
}; };
}; };
@ -62,7 +62,7 @@ with lib; let
values); values);
submoduleOf = ref: submoduleOf = ref:
types.submodule ({name, ...}: { types.submodule ({ ...}: {
options = definitions."${ref}".options or {}; options = definitions."${ref}".options or {};
config = definitions."${ref}".config or {}; config = definitions."${ref}".config or {};
}); });
@ -234,7 +234,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -454,7 +454,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -660,7 +660,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -882,7 +882,7 @@ with lib; let
"io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name"); "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -1288,7 +1288,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DaemonSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentNumberScheduled" = mkOption { "currentNumberScheduled" = mkOption {
@ -1507,7 +1507,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.DeploymentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"observedGeneration" = mkOption { "observedGeneration" = mkOption {
@ -1687,7 +1687,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.ReplicaSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -1907,7 +1907,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.apps.v1.StatefulSetCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentReplicas" = mkOption { "currentReplicas" = mkOption {
@ -4502,7 +4502,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.batch.v1.JobCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"failed" = mkOption { "failed" = mkOption {
@ -5719,7 +5719,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ComponentCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"kind" = mkOption { "kind" = mkOption {
@ -5960,7 +5960,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -5996,7 +5996,7 @@ with lib; let
"containerPort"); "containerPort");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"readinessProbe" = mkOption { "readinessProbe" = mkOption {
@ -6042,7 +6042,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -6052,7 +6052,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -6565,7 +6565,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EnvVar" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"envFrom" = mkOption { "envFrom" = mkOption {
@ -6643,7 +6643,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeDevice" "devicePath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumeMounts" = mkOption { "volumeMounts" = mkOption {
@ -6653,7 +6653,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.VolumeMount" "mountPath");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"workingDir" = mkOption { "workingDir" = mkOption {
@ -6699,7 +6699,7 @@ with lib; let
coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name"; coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"kind" = mkOption { "kind" = mkOption {
@ -7638,7 +7638,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NamespaceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -7926,7 +7926,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeAddress" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"allocatable" = mkOption { "allocatable" = mkOption {
@ -7944,7 +7944,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.NodeCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"config" = mkOption { "config" = mkOption {
@ -8280,7 +8280,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"phase" = mkOption { "phase" = mkOption {
@ -8848,7 +8848,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"dnsConfig" = mkOption { "dnsConfig" = mkOption {
@ -8871,7 +8871,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.EphemeralContainer" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostAliases" = mkOption { "hostAliases" = mkOption {
@ -8880,7 +8880,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.HostAlias" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"hostIPC" = mkOption { "hostIPC" = mkOption {
@ -8906,7 +8906,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.LocalObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"initContainers" = mkOption { "initContainers" = mkOption {
@ -8916,7 +8916,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Container" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"nodeName" = mkOption { "nodeName" = mkOption {
@ -9003,7 +9003,7 @@ with lib; let
"topologyKey"); "topologyKey");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"volumes" = mkOption { "volumes" = mkOption {
@ -9012,7 +9012,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.Volume" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -9063,7 +9063,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"containerStatuses" = mkOption { "containerStatuses" = mkOption {
@ -9109,7 +9109,7 @@ with lib; let
types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip"); types.nullOr (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.PodIP" "ip");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"qosClass" = mkOption { "qosClass" = mkOption {
@ -9596,7 +9596,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"fullyLabeledReplicas" = mkOption { "fullyLabeledReplicas" = mkOption {
@ -10241,7 +10241,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ObjectReference" "name");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -10439,7 +10439,7 @@ with lib; let
(coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port"); (coerceAttrsOfSubmodulesToListByKey "io.k8s.api.core.v1.ServicePort" "port");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"publishNotReadyAddresses" = mkOption { "publishNotReadyAddresses" = mkOption {
@ -10505,7 +10505,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"loadBalancer" = mkOption { "loadBalancer" = mkOption {
@ -13612,7 +13612,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentHealthy" = mkOption { "currentHealthy" = mkOption {
@ -13860,7 +13860,7 @@ with lib; let
"type"); "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"currentHealthy" = mkOption { "currentHealthy" = mkOption {
@ -15525,7 +15525,7 @@ with lib; let
type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name"; type = coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -16212,7 +16212,7 @@ with lib; let
coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name"; coerceAttrsOfSubmodulesToListByKey "io.k8s.api.storage.v1beta1.CSINodeDriver" "name";
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -18467,7 +18467,7 @@ with lib; let
"io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid"); "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" "uid");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
"resourceVersion" = mkOption { "resourceVersion" = mkOption {
@ -18903,7 +18903,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };
@ -19078,7 +19078,7 @@ with lib; let
"io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type"); "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" "type");
apply = values: apply = values:
if values != null if values != null
then mapAttrsToList (n: v: v) values then mapAttrsToList (_n: v: v) values
else values; else values;
}; };
}; };

View file

@ -16,7 +16,7 @@ with lib; let
name = "recursive-attrs"; name = "recursive-attrs";
description = "recursive attribute set"; description = "recursive attribute set";
check = isAttrs; check = isAttrs;
merge = loc: foldl' (res: def: recursiveUpdate res def.value) {}; merge = _loc: foldl' (res: def: recursiveUpdate res def.value) {};
}; };
parseApiVersion = apiVersion: let parseApiVersion = apiVersion: let

View file

@ -35,74 +35,17 @@ with lib; let
getSubOptions = finalType.getSubOptions; getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules; getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null; typeMerge = _t1: _t2: null;
functor = (defaultFunctor name) // {wrapped = finalType;}; functor = (defaultFunctor name) // {wrapped = finalType;};
}; };
}; };
mkOptionDefault = mkOverride 1001;
extraOptions = {
kubenix = {};
};
mergeValuesByKey = mergeKey: values:
listToAttrs (map
(value:
nameValuePair
(
if isAttrs value.${mergeKey}
then toString value.${mergeKey}.content
else (toString value.${mergeKey})
)
value)
values);
submoduleOf = ref: submoduleOf = ref:
types.submodule ({name, ...}: { types.submodule ({ ...}: {
options = definitions."${ref}".options; options = definitions."${ref}".options;
config = definitions."${ref}".config; config = definitions."${ref}".config;
}); });
submoduleWithMergeOf = ref: mergeKey:
types.submodule ({name, ...}: let
convertName = name:
if definitions."${ref}".options.${mergeKey}.type == types.int
then toInt name
else name;
in {
options = definitions."${ref}".options;
config =
definitions."${ref}".config
// {
${mergeKey} = mkOverride 1002 (convertName name);
};
});
submoduleForDefinition = ref: resource: kind: group: version:
types.submodule ({name, ...}: {
options = definitions."${ref}".options // extraOptions;
config = mkMerge ([
definitions."${ref}".config
{
kind = mkOptionDefault kind;
apiVersion = mkOptionDefault version;
# metdata.name cannot use option default, due deep config
metadata.name = mkOptionDefault name;
}
]
++ (config.defaults.${resource} or [])
++ (config.defaults.all or []));
});
coerceAttrsOfSubmodulesToListByKey = ref: mergeKey: (
types.coercedTo
(types.listOf (submoduleOf ref))
(mergeValuesByKey mergeKey)
(types.attrsOf (submoduleWithMergeOf ref mergeKey))
);
definitions = definitions =
{ {
"google_rpc_Status" = { "google_rpc_Status" = {

View file

@ -25,7 +25,7 @@ with lib; let
moduleToAttrs = value: moduleToAttrs = value:
if isAttrs 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 else if isList value
then map (v: moduleToAttrs v) value then map (v: moduleToAttrs v) value
else value; else value;
@ -38,7 +38,7 @@ with lib; let
defaults = mkOption { defaults = mkOption {
description = "Kubernetes defaults to apply to resources"; description = "Kubernetes defaults to apply to resources";
type = types.listOf (types.submodule ({config, ...}: { type = types.listOf (types.submodule ({ ...}: {
options = { options = {
group = mkOption { group = mkOption {
description = "Group to apply default to (all by default)"; description = "Group to apply default to (all by default)";
@ -258,7 +258,7 @@ with lib; let
getSubOptions = finalType.getSubOptions; getSubOptions = finalType.getSubOptions;
getSubModules = finalType.getSubModules; getSubModules = finalType.getSubModules;
substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);
typeMerge = t1: t2: null; typeMerge = _t1: _t2: null;
functor = (defaultFunctor name) // {wrapped = finalType;}; functor = (defaultFunctor name) // {wrapped = finalType;};
}; };
in in
@ -405,7 +405,7 @@ in {
_m.propagate = [ _m.propagate = [
{ {
features = ["k8s"]; features = ["k8s"];
module = {config, ...}: { module = { ...}: {
# propagate kubernetes version and namespace # propagate kubernetes version and namespace
kubernetes.version = mkDefault cfg.version; kubernetes.version = mkDefault cfg.version;
kubernetes.namespace = mkDefault cfg.namespace; kubernetes.namespace = mkDefault cfg.namespace;
@ -485,7 +485,7 @@ in {
kubernetes.objects = flatten (mapAttrsToList kubernetes.objects = flatten (mapAttrsToList
( (
_: type: _: type:
mapAttrsToList (name: resource: moduleToAttrs resource) mapAttrsToList (_name: resource: moduleToAttrs resource)
cfg.api.resources.${type.group}.${type.version}.${type.kind} cfg.api.resources.${type.group}.${type.version}.${type.kind}
) )
cfg.api.types); cfg.api.types);

View file

@ -85,7 +85,7 @@ with lib; let
passthruConfig = passthruConfig =
mapAttrsToList mapAttrsToList
(name: opt: { (name: _opt: {
${name} = mkMerge (mapAttrsToList ${name} = mkMerge (mapAttrsToList
( (
_: inst: _: inst:
@ -162,7 +162,7 @@ with lib; let
# Merging of submodules is done as part of mergeOptionDecls, as we have to annotate # Merging of submodules is done as part of mergeOptionDecls, as we have to annotate
# each submodule with its location. # each submodule with its location.
payload = []; payload = [];
binOp = lhs: rhs: []; binOp = _lhs: _rhs: [];
}; };
}; };
in { in {
@ -177,7 +177,7 @@ in {
submodules.defaults = mkOption { submodules.defaults = mkOption {
description = "List of defaults to apply to submodule instances"; description = "List of defaults to apply to submodule instances";
type = types.listOf (types.submodule ({config, ...}: { type = types.listOf (types.submodule ({ ...}: {
options = { options = {
name = mkOption { name = mkOption {
description = "Name of the submodule to apply defaults for"; description = "Name of the submodule to apply defaults for";

View file

@ -43,7 +43,7 @@ in {
common = mkOption { common = mkOption {
description = "List of common options to apply to tests"; description = "List of common options to apply to tests";
type = types.listOf (types.submodule ({config, ...}: { type = types.listOf (types.submodule ({ ...}: {
options = { options = {
features = mkOption { features = mkOption {
description = "List of features that test has to have to apply options"; description = "List of features that test has to have to apply options";

View file

@ -14,9 +14,6 @@ with lib; let
# how we differ from the standard configuration of mkKubernetesBaseTest # how we differ from the standard configuration of mkKubernetesBaseTest
extraConfiguration = { extraConfiguration = {
config, config,
pkgs,
lib,
nodes,
... ...
}: { }: {
virtualisation = { virtualisation = {

View file

@ -1,12 +1,9 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: }:
with lib; let with lib; {
cfg = config.test;
in {
options.test = { options.test = {
name = mkOption { name = mkOption {
description = "Test name"; description = "Test name";

View file

@ -1,5 +1,4 @@
{ {
config,
kubenix, kubenix,
... ...
}: { }: {

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
kubenix, kubenix,
pkgs,
... ...
}: }:
with lib; let with lib; let

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
kubenix, kubenix,
images, images,
test, test,

View file

@ -2,12 +2,9 @@
config, config,
lib, lib,
kubenix, kubenix,
pkgs,
... ...
}: }:
with lib; let with lib; {
cfg = config.kubernetes.api.resources.customResourceDefinitions.crontabs;
in {
imports = with kubenix.modules; [test k8s]; imports = with kubenix.modules; [test k8s];
test = { test = {

View file

@ -6,9 +6,7 @@
images, images,
... ...
}: }:
with lib; let with lib; {
cfg = config.submodules.instances.passthru;
in {
imports = with kubenix.modules; [test submodules k8s docker]; imports = with kubenix.modules; [test submodules k8s docker];
test = { test = {

View file

@ -13,7 +13,7 @@ with lib; let
instance5 = config.submodules.instances.instance5; instance5 = config.submodules.instances.instance5;
versioned-submodule = config.submodules.instances.versioned-submodule; versioned-submodule = config.submodules.instances.versioned-submodule;
submodule = {name, ...}: { submodule = { ...}: {
imports = [kubenix.modules.submodule]; imports = [kubenix.modules.submodule];
options.submodule.args = { options.submodule.args = {