Skip to content

[DOC] - auto-generate CRD reference #149

Description

@andrewfulton9

Preliminary Checks

Summary

Add a make docs target (or equivalent) to nebari-operator that generates a NicApp CRD reference in markdown from the CRD schema, so nebari-docs can pull it at build time without hand-edited pages drifting from the code.

Related: nebari-dev/nebari-docs#665

Work

Generate NicApp CRD reference markdown

  • Tooling: crd-ref-docs (or controller-gen with a doc plugin) invoked via a make docs target
  • Source: the CRD definition produced by controller-gen from the operator's Go types
  • Output: a single markdown file with a field-by-field reference table and annotated examples, emitted to a known path (e.g. docs/nicapp-crd-reference.md)

Wire into CI

  • Add a CI step that runs the generator and fails the build if:
    • the generator errors, or
    • the output is stale (generated content does not match the committed file — enforce with git diff --exit-code)

Acceptance criteria

  • make docs (or equivalent) generates NicApp CRD reference markdown from the CRD schema
  • Generated output is committed to the repo at a stable path that nebari-docs can reference
  • CI fails if the generator errors or if generated content is out of sync with the CRD types
  • No hand-edited CRD field documentation — all field descriptions come from Go type comments/markers

Notes

  • nebari-docs will pull this generated file at build time (via git submodule, released artifact, or a sync script — the mechanism is decided on the nebari-docs side)
  • Field descriptions shown in the reference come from // +kubebuilder:validation markers and Go doc comments on the struct fields — make sure those are present and accurate before the generator runs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Size

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions