Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart docs #105

Merged
merged 16 commits into from
Aug 9, 2021
Merged

Chart docs #105

merged 16 commits into from
Aug 9, 2021

Conversation

keyvaann
Copy link
Collaborator

@keyvaann keyvaann commented Jul 28, 2021

Here is the template that we can use to generate documentation for charts.
This is created via helm-docs. It reads values description from values.yaml and other information from README.md.gotmpl and Chart.yaml files. We can also add custom general templates like the one defined in _templates.gotmpl files.

To generate the README.md files I ran this command from main directory of repository:

helm-docs -s file --template-files=./_templates.gotmpl --template-files=README.md.gotmpl

We can add the helm-docs command as a Pre-commit hook but it does depend on the developer to install it on their machine and make sure to configure it. I prefer if we have a CI test for it as well to check for this.

@keyvaann keyvaann marked this pull request as draft July 28, 2021 12:02
@keyvaann
Copy link
Collaborator Author

There a 2 other alternatives for helm-docs and we can consider them as well if this approach doesn't work for us:
https://github.com/kubepack/chart-doc-gen
https://github.com/bitnami-labs/readme-generator-for-helm

Copy link
Contributor

@nivemaham nivemaham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea. Although, I think the value.yaml are usually auto generated with some k8s specific configs which I am not sure if we should document. I think the application specific ones make sense. So starting from postgres.*

Is there anyway (probably with custom template) we can control this.
In any case, we still have to document each values on value.yaml.

@keyvaann
Copy link
Collaborator Author

keyvaann commented Jul 28, 2021

For the default values from values.yaml we can define them once and copy them to other charts.

@blootsvoets
Copy link
Contributor

blootsvoets commented Jul 29, 2021

The setup with helm-docs looks good to me. We could opt for a few more defaults templates, like how you use the RADAR-Kubernetes repo, and add a per-chart more detailed usage instruction (e.g. when to use certain config settings, etc.)

The oauth client config is very verbose now, but from the readme https://github.com/norwoodj/helm-docs#markdown-rendering looks like it is possible to modify the comments such that not all values are shown.

@blootsvoets
Copy link
Contributor

Never mind, it's not possible to skip values. chart-doc-gen is not well-documented, I suggest we skip that. https://github.com/bitnami-labs/readme-generator-for-helm looks the most mature, but it does not support tempating the other sections out of the box, it just templates the values documentation. Also it is much more verbose. In all, I think helm-docs is a fine choice.

@nivemaham
Copy link
Contributor

Alright. My first choice is helm-docs as well. I think we have a decision on the tool.

@keyvaann
Copy link
Collaborator Author

@blootsvoets we can split oauth client config into another values file so it won't be read by helm-docs but we manually create the documentation for it

@nivemaham
Copy link
Contributor

@K1Hyve I think that makes sense. If you can split them into another values, I can do the documentation.

@keyvaann
Copy link
Collaborator Author

@nivemaham you can start documenting values in this chart and other charts if you have time and I'll separating the values file next week

@nivemaham
Copy link
Contributor

@K1Hyve Yes. Will do. 👍

@keyvaann
Copy link
Collaborator Author

keyvaann commented Aug 3, 2021

@nivemaham Now you can add MP specific documents.

For details on how to configure OAuth client you can add them to DOCS.md.gotmpl

Use make gen to generate the README.md again.

@keyvaann keyvaann mentioned this pull request Aug 3, 2021
2 tasks
* dev:
  Only do lint test if charts directory have changed
  Renamed helm chart release branch name
  Added PR and Issue templates
  Disabled helm test due to complications on dependencies
  Added checklist job for Github Actions
  Removed TravisCI in favor of Github actions
  Fixed Helm chart linting errors
  Added chart lint and testing and PR
@github-actions
Copy link

github-actions bot commented Aug 3, 2021

Great PR! Please pay attention to the following items before merging:

Files matching charts/*/values.yaml:

  • Is the PR adding a new container? Please reviewer, add it to the models (internal process)
  • Is the PR adding a new parameter? Please, ensure it’s documented in the README.md

This is an automatically generated QA checklist based on modified files

@nivemaham nivemaham mentioned this pull request Aug 4, 2021
3 tasks
@nivemaham nivemaham mentioned this pull request Aug 6, 2021
3 tasks
@keyvaann keyvaann changed the title WIP: Chart docs Chart docs Aug 9, 2021
@keyvaann keyvaann marked this pull request as ready for review August 9, 2021 10:42
Copy link
Contributor

@nivemaham nivemaham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think we can merge. We can review again, when Joris is back with all of the changes done before merging to master.

Add documentation for Fitbit connector and rest-sources-authorizer
@nivemaham nivemaham merged commit a6202d9 into dev Aug 9, 2021
@keyvaann keyvaann deleted the chart-docs branch August 11, 2021 09:52
blootsvoets pushed a commit that referenced this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants