Skip to content

Spike: generating a CRD reference #238

@fhennig

Description

@fhennig

Many operators are missing a CRD reference for the ProductCluster resource. Instead of manually creating it and having to maintain it, it would be nice if it was possible to generate it from the rust code/the generated CRD files.

This should be spiked for one operator and then put into the templating if possible.

Tested tools

I noticed that if I generate docs for i.e. the DruidCluster, it also generates the docs for all the embedded types, i.e. the S3Resource. I think those should be documented separately.

Conclusion

Good documentation cannot be generated from the CRD file, as a lot of information is missing from it. The one tool that generates nice docs uses the underlying source files as a basis for the docs. This only works with go files.

There is no good tool to do this at the moment.

My preferred solution would be something that integrates with the rust code, like the go solution. That seems way more work than initially thought though.


The config I used for the CRD docs generator:

template_path: templates/crd.template

output_path: output

source_repositories:
  - url: https://github.com/stackabletech/druid-operator
    organization: stackabletech
    short_name: druid-operator
    commit_reference: main
    crd_paths:
      - deploy/crd
    cr_paths:
    metadata:
      druidclusters.druid.stackable.tech:
        owner:
          - https://github.com/orgs/giantswarm/teams/team-honeybadger
        topics:
          - apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions