mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat(k8s): deprecate createCustomTypesFromCRDs, only support in legacy
This commit is contained in:
parent
13e47144fd
commit
3534f5fc61
2 changed files with 9 additions and 19 deletions
|
|
@ -242,12 +242,6 @@ in {
|
|||
type = types.attrsOf types.attrs;
|
||||
};
|
||||
|
||||
createCustomTypesFromCRDs = mkOption {
|
||||
description = "Whether to create customTypes from custom resource definitions";
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
customTypes = mkOption {
|
||||
description = "List of custom resource types to make API for";
|
||||
type = coerceListOfSubmodulesToAttrs {
|
||||
|
|
@ -389,17 +383,6 @@ in {
|
|||
cfg.api.resources.${type.group}.${type.version}.${type.kind}
|
||||
) cfg.api.types);
|
||||
|
||||
# custom types created from customResourceDefinitions
|
||||
kubernetes.customTypes = mkIf cfg.createCustomTypesFromCRDs (
|
||||
mapAttrsToList (name: crd: {
|
||||
group = crd.spec.group;
|
||||
version = crd.spec.version;
|
||||
kind = crd.spec.names.kind;
|
||||
name = crd.spec.names.plural;
|
||||
attrName = mkOptionDefault name;
|
||||
}) (cfg.resources.customResourceDefinitions or {})
|
||||
);
|
||||
|
||||
kubernetes.generated = k8s.mkHashedList {
|
||||
items = config.kubernetes.objects;
|
||||
labels."kubenix/project-name" = config.kubenix.project;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue