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

chore(docs): docs/flags.md generation #4983

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Dec 30, 2024

Description

Added logic to generate docs/flags.md file with all currently supported flags.

At the moment, there are few way to find supported flags

  • pull sources and run --help or similar
  • pull docker image and run --help or similar
  • check sources
  • google the issue Documentation for supported flags and environment variables #4260
  • more important not always clear where it is --traefik-disable-legacy or traefik-disable-legacy=true as well as where or not --no- case is supported or not and what the default value is

Added tests that will fail if new flag is added and docs/flag.md not re-generated

Fixes #4260

Checklist

  • Unit tests updated
  • End user documentation updated

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign raffo for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 30, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @ivankatliarchuk. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 30, 2024
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@mloiseleur
Copy link
Contributor

That looks really interesting, thanks @ivankatliarchuk !
/ok-to-test

BTW, do you think you can connect on kubernetes slack to #external-dns channel ?

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 30, 2024
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk
Copy link
Contributor Author

I would join k8s slack if i could ;-) 😂😂😂😂😂😂😂

@mloiseleur
Copy link
Contributor

Would you please add a Makefile target that generate the markdown ?

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk
Copy link
Contributor Author

Sure. Added. A note: Makefile contains quite few special characters that not necessary need to be there

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk
Copy link
Contributor Author

is generate-documentation OK or generate-markdown ?

Copy link
Contributor

@Raffo Raffo left a comment

Choose a reason for hiding this comment

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

Added a few comments.

I'd also ask that the folder name is adjusted as gen is pretty generic and not descriptive of its content. Maybe you can have internernal/gen/flagdocs or something similar to avoid long names? I'm open to other proposals as well.

Makefile Outdated Show resolved Hide resolved
internal/gen/main.go Outdated Show resolved Hide resolved
ivankatliarchuk and others added 2 commits January 2, 2025 15:51
code review changes

Co-authored-by: Raffaele Di Fazio <raffo@github.com>
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Makefile Outdated Show resolved Hide resolved
added over Github UI, as Makefile contains some special characters
@ivankatliarchuk
Copy link
Contributor Author

Changed folder name to internal/gen/docs/flags.

@ivankatliarchuk ivankatliarchuk requested a review from Raffo January 2, 2025 16:19
Makefile Outdated Show resolved Hide resolved
code review

Co-authored-by: Raffaele Di Fazio <raffo@github.com>
@ivankatliarchuk ivankatliarchuk requested a review from Raffo January 2, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for supported flags and environment variables
4 participants