-
Notifications
You must be signed in to change notification settings - Fork 979
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
update development guide #654
Conversation
✔️ Deploy Preview for karpenter-docs-prod canceled. 🔨 Explore the source changes: 1f0e713 🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/61377f36c73c1a00078a63d4 |
@@ -13,7 +13,7 @@ The following tools are required for contributing to the Karpenter project. | |||
| [go](https://golang.org/dl/) | v1.15.3+ | [Instructions](https://golang.org/doc/install) | | |||
| [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | | `brew install kubectl` | | |||
| [helm](https://helm.sh/docs/intro/install/) | | `brew install helm` | | |||
| Other tools | | `make toolchain` | | |||
| Other tools | | `make toolchain` then ensure `PATH` contains Go workspace's `bin` | |
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.
Instead of putting this here, what do you think about adding some output in the toolchain.sh script to echo something like: PATH=$PATH:$GOPATH/bin
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.
🆗
@@ -39,6 +39,7 @@ make delete # Uninstall Karpenter | |||
### Build and Deploy | |||
``` | |||
make dev # build and test code | |||
kubectl create namespace karpenter # create target namespace for deployment |
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.
Nice catch. We typically have this namespace created as part of the getting-started guide (helm install --create-namespace), but this is a great note to have here.
Apparently GOPATH is not set in the CI environment. Is the preferred solution to add GOPATH to the CI environment (and update the check in toolchain.sh to avoid the "unbound variable" error) or just remove the check in toolchain.sh? |
GOPATH is technically optional in go now since modules have taken over most of its use. We could change the check in toolchain.sh to check if |
@@ -11,6 +11,10 @@ tools() { | |||
cd tools | |||
go mod tidy | |||
GO111MODULE=on cat tools.go | grep _ | awk -F'"' '{print $2}' | xargs -tI % go install % | |||
|
|||
if ! echo "$PATH" | grep -q "${GOPATH:-undefined}/bin\|$HOME/go/bin"; then |
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.
My path is actually at $HOME/workspaces/go. Thoughts on removing this check entirely and just printing a friendly message that isn't exact, but can at least provide users a hint.
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.
I'm guessing $HOME/workspaces/go
is what your $GOPATH
is set to? But if that weren't set for you, then go
would default to $HOME/go
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.
🎉
f731469
to
1f0e713
Compare
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.
lgtm
Issue, if available:
Description of problem(s):
make codegen
fails, even after runningmake toolchain
, because of missing executablesmake apply
fails because cluster namespace, "karpenter", does not existDescription of changes:
PATH
with Go workspace'sbin
after runningmake toolchain
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.