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,
pkgs,
kubenix,

View file

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

View file

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

View file

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

View file

@ -26,7 +26,7 @@ with lib; let
builtins.readFile
(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:
(foldr

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -35,74 +35,17 @@ 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;};
};
};
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:
types.submodule ({name, ...}: {
types.submodule ({ ...}: {
options = definitions."${ref}".options;
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 =
{
"google_rpc_Status" = {

View file

@ -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);

View file

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

View file

@ -43,7 +43,7 @@ in {
common = mkOption {
description = "List of common options to apply to tests";
type = types.listOf (types.submodule ({config, ...}: {
type = types.listOf (types.submodule ({ ...}: {
options = {
features = mkOption {
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
extraConfiguration = {
config,
pkgs,
lib,
nodes,
...
}: {
virtualisation = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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