Skip to content

feat: add cluster-less CRD manifest generation to KFC #2291

@chance-coleman

Description

@chance-coleman

Is your feature request related to a problem? Please describe.

Currently, kubernetes-fluent-client requires a live Kubernetes cluster to fetch CRD schemas before it can generate TypeScript types. This creates a runtime dependency for build-time tasks and prevents type generation in cluster-less CI/CD environments.

Describe the solution you'd like

Add a new export capability to KFC that allows serializing TypeScript-defined CRD versions into standard Kubernetes YAML manifests.

  • Given a TypeScript file exporting a V1CustomResourceDefinitionVersion (e.g., from @kubernetes/client-node)
  • When the kfc export command is executed with the source file and desired metadata (Kind, Group, Scope)
  • Then a valid apiextensions.k8s.io/v1 CustomResourceDefinition manifest is generated.

Acceptance Criteria:

  • Support for js-yaml serialization of deep schema objects.
  • Ability to specify output directory and filename patterns.
  • Integration with existing KFC type generation logic to allow a TS -> YAML -> Types flow in a single process.

Describe alternatives you've considered

Manual YAML authoring (rejected due to duplication) or lightweight cluster simulation like Kwok (rejected to remove binary dependencies).

Additional context

See UDS Core ADR 0007 for the architectural driver behind this request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions