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

Generate Markdown docs #414

Merged
merged 7 commits into from
Aug 11, 2021
Merged

Generate Markdown docs #414

merged 7 commits into from
Aug 11, 2021

Conversation

imjasonh
Copy link
Member

This is largely copied from similar work in go-containerregistry

This required moving the Root command definition out of main() into a
place where it could be referenced from the gendoc tooling.

Rendered: https://github.com/imjasonh/ko/blob/docs/doc/ko.md

@imjasonh imjasonh requested a review from jonjohnsonjr August 10, 2021 15:05
@google-cla google-cla bot added the cla: yes label Aug 10, 2021
@imjasonh
Copy link
Member Author

Two docgen diff issues:

  1. --jobs defaults to GOMAXPROCS, which will be different for different users
-  -j, --jobs int                       The maximum number of concurrent builds (default 2)
+  -j, --jobs int                       The maximum number of concurrent builds (default 8)
  1. --cache-dir (inherited from kubectl) will differ based on the user's homedir:
-      --cache-dir string               Default cache directory (default "/home/runner/.kube/cache")
+      --cache-dir string               Default cache directory (default "/Users/jasonhall/.kube/cache")

Sort of inclined to make both of these defined as zero values for the flag default, then interpret --jobs=0 as --jobs=GOMAXPROCS and --cache-dir as --cache-dir=$HOME/.kube/cache only at runtime.

@imjasonh
Copy link
Member Author

We'll have more flexibility to change how --cache-dir is defaulted after (or as part of) #413

@jonjohnsonjr
Copy link
Collaborator

--jobs defaults to GOMAXPROCS, which will be different for different users

What if we did something stupid like replace The maximum number of concurrent builds (default 2) with The maximum number of concurrent builds (default GOMAXPROCS) via sed?

@imjasonh
Copy link
Member Author

What if we did something stupid like replace The maximum number of concurrent builds (default 2) with The maximum number of concurrent builds (default GOMAXPROCS) via sed?

Defaulting -j at runtime seems more robust than relying on sed. See 903d3f4

This is largely copied from similar work in go-containerregistry

This required moving the Root command definition out of main() into a
place where it could be referenced from the gendoc tooling.
@jonjohnsonjr jonjohnsonjr merged commit 780c281 into ko-build:main Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants