-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Automate helm docs #77
Conversation
28be07e
to
23a1e79
Compare
some feedback: we should generate helm rst doc but should not blindly publish it on merge in workflow, it can easily go south when autogenerating from comments added by devs, without any review in the middle this will most likely get missed (or caught too late)
|
Thanks @adrianchiris for the feedback.
I agree with your concern here. But I think we should always regenerate the So what about this update to your list? :
|
Hey @souleb ! Here are some point i had in mind (which i guess we disagree on :) ):
some of my comments reviewing this PR are related to the points above |
So every time a developer makes change to the api and the helm chart in
This is not distracting, because this will be part of the PR only if there are changes in the helm chart or doc template? And this way we have the fastest feedback loop and can avoid back and forth between 2 repositories. See: Mellanox/network-operator#1011 for latest state |
fb439f3
to
0ecec25
Compare
If implemented the helm customization file will be generated automatically. A makefile is created with several targets in order to fetch the needed chart and generate an `rst` doc based on a template. Signed-off-by: Soule BA <[email protected]>
0ecec25
to
2616009
Compare
Do not merge before Mellanox/network-operator#1011 |
150653a
to
ce50067
Compare
Signed-off-by: Soule BA <[email protected]>
ce50067
to
db7b27f
Compare
|
||
BRANCH ?= master | ||
# Paths to download the helm chart to. | ||
HELM_CHART_DEP_ROOT ?= $(BUILDDIR)/helmcharts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just making sure:
if i run
HELM_CHART_DEP_ROOT=/path/to/my/local/network-operator/deployment/network-operator make helm-docs
it will work right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but there are two assumptions here:
HELM_CHART_DEP_ROOT
should contain your chart- .helmdocsignore targets
$(BUILDDIR)/helmcharts
, so if you target another path, it won't be taken into account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add support for that ? does it make sense ?
what i was thinking:
- dev works on some feature in network operator, eventually updates chart and submits PR
- dev generates updated helm.rst from his local network operator branch and submits PR to network-operator-docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the content of the .helmdocsignore
as to be relative it seems. I wanted to use realpath
to make it works, but this isn't POSIX and have different behaviour between linux and mac... I don't have a solution so far for this.
On second thoughts, if the user provides his Branch
and Fork url
, he can use make branch-helm-doc
just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have another env PARAM like 'LOCAL_HELM_SOURCE_DIR`, and if it exists, copy content to build/_output/helmcharts/network-operator/charts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's take some time to think about this one. For now what I think is that a single repo would enable that easily :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me followup with PR on generating from local sources. then each can pick an choose. thx for working on this one @souleb !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a small question otherwise LGTM
once Mellanox/network-operator#1011 is merged, can you followup with a PR to update helm.rst ?
This PR depends on it. Once it is merged, I'll update |
This PR is about automating the helm docs generation for a given helm chart version. It relies on helm-docs.
A template is provided in order to generate
heml.rst
, the reStructuredText formatted doc. This template has access to all the metadata in the chart'srequirements.yaml
, andChart.yaml
as well as thechart values
. The advantage here is that any changes to those special files in the chart or in the template itself, can automatically generate an up to date documentation.Note As we want to avoid any manual action i.e. copy for the helm chart
values
, thevalues.yaml
is the source of truth and has to be update to contain all needed information. One critical missing part is the fields descriptions. We can also set markers in it in order to hide some fields.TO-DO
helm-docs
, fetch the right chart version and generatehelm.rst
helm.rst.gotmpl
that can generate the righthelm.rst
helm.rst
before publishing a new versionEdit: Depends on Mellanox/network-operator#1011