Code Monkey home page Code Monkey logo

crdoc's Introduction

crdoc

Go Report Card Go Reference golangci-lint CodeQL gosec

Generate markdown documentation from Kubernetes CustomResourceDefinition YAML files.

Install

Install crdoc using one of the following methods:

Binary

Download the appropriate version for your platform from Releases. You may want to install the binary to somewhere in your system's PATH such as /usr/local/bin.

For convenience, an installation script is also available:

Go install

If you have goLang 1.19 or later then you can use go install. This will put the latest released version of crdoc in $(go env GOPATH)/bin:

go install fybrik.io/crdoc@latest

๐Ÿ’ก Prefer pinning to a specific version rather than using @latest when installing in a CI workflow

Docker images

Docker images are available and allow you to run crdoc directly via docker. For example:

docker run -u $(id -u):$(id -g) --rm -v ${PWD}:/workdir ghcr.io/fybrik/crdoc:latest --resources /workdir/example/crds --output /workdir/example/output.md

๐Ÿ’ก Prefer pinning to a specific version rather than using :latest when running in a CI workflow

Usage

Output markdown documentation from Kubernetes CustomResourceDefinition YAML files

Usage:
  crdoc [flags]

Examples:

  # Generate example/output.md from example/crds using the default markdown.tmpl template: 
  crdoc --resources example/crds --output example/output.md

  # Override template (builtin or custom):
  crdoc --resources example/crds --output example/output.md --template frontmatter.tmpl
  crdoc --resources example/crds --output example/output.md --template templates_folder/file.tmpl

  # Use a Table of Contents to filter and order CRDs
  crdoc --resources example/crds --output example/output.md --toc example/toc.yaml


Flags:
  -h, --help               help for crdoc
  -o, --output string      Path to output markdown file (required)
  -r, --resources string   Path to YAML file or directory containing CustomResourceDefinitions (required)
  -t, --template string    Path to file in a templates directory (default "markdown.tmpl")
  -c, --toc string         Path to table of contents YAML file
  -v, --version            version for crdoc

Limitations

  • There are no custom type information because this information is not available in the YAMLs. This tool was specifically designed with that in mind and provides a different reader experience compared to other similar tools.
  • apiextensions.k8s.io/v1beta1 is supported but we assume a structural schema as required by v1.

Similar tools

crdoc's People

Contributors

dependabot[bot] avatar roytman avatar roee88 avatar github-actions[bot] avatar cbandy avatar rodrigc avatar matej-g avatar revit13 avatar ronenkat avatar trynity avatar bszeti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.