add custom resource option examples

This commit is contained in:
Bryton Hall 2022-08-31 21:38:37 -04:00
parent 7ba59d844f
commit a85d680f57

View file

@ -283,12 +283,14 @@ in {
description = "Kubernetes version to use"; description = "Kubernetes version to use";
type = types.enum versions; type = types.enum versions;
default = lib.lists.last versions; default = lib.lists.last versions;
example = "1.24";
}; };
namespace = mkOption { namespace = mkOption {
description = "Default namespace where to deploy kubernetes resources"; description = "Default namespace where to deploy kubernetes resources";
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "default";
}; };
customResources = mkOption { customResources = mkOption {
@ -332,22 +334,35 @@ in {
customTypes = mkOption { customTypes = mkOption {
description = "List of custom resource types to make API for"; description = "List of custom resource types to make API for";
example = [
{
helmchartconfig = {
attrName = "helmchartconfig";
kind = "HelmChartConfig";
version = "v1";
group = "helm.cattle.io";
};
}
];
type = type =
coerceListOfSubmodulesToAttrs coerceListOfSubmodulesToAttrs
{ {
options = { options = {
group = mkOption { group = mkOption {
description = "Custom type group"; description = "Custom type group";
example = "helm.cattle.io";
type = types.str; type = types.str;
}; };
version = mkOption { version = mkOption {
description = "Custom type version"; description = "Custom type version";
example = "v1";
type = types.str; type = types.str;
}; };
kind = mkOption { kind = mkOption {
description = "Custom type kind"; description = "Custom type kind";
example = "HelmChartConfig";
type = types.str; type = types.str;
}; };
@ -359,6 +374,7 @@ in {
attrName = mkOption { attrName = mkOption {
description = "Name of the nixified attribute"; description = "Name of the nixified attribute";
# default = name;
type = types.str; type = types.str;
}; };