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

Make go and kubectl version configurable #926

Closed
embano1 opened this issue Jan 12, 2023 · 1 comment · Fixed by #930
Closed

Make go and kubectl version configurable #926

embano1 opened this issue Jan 12, 2023 · 1 comment · Fixed by #930

Comments

@embano1
Copy link
Contributor

embano1 commented Jan 12, 2023

Currently, ko uses hardcoded values to retrieve the go and kubectl executables, e.g.

cmd := exec.CommandContext(ctx, "go", args...)

The desired behavior is to make those binary locations configurable, e.g. via KO_GO_PATH and KO_KUBECTL_PATH.
Alternatively, they could be specified in .ko.yaml but this might be overkill as setting these values are considered exceptional.

@imjasonh
Copy link
Member

Let's start with KO_GO_PATH. AFAIK nobody's asked to be able to change the kubectl path. The naming is convenient because if we want to make it configurable in .ko.yaml we can just add a go_path field and Viper will pick up KO_GO_PATH for us.

embano1 added a commit to embano1/ko that referenced this issue Jan 13, 2023
Closes: ko-build#926
Signed-off-by: Michael Gasch <[email protected]>
embano1 added a commit to embano1/ko that referenced this issue Jan 13, 2023
Closes: ko-build#926
Signed-off-by: Michael Gasch <[email protected]>
embano1 added a commit to embano1/ko that referenced this issue Jan 18, 2023
Closes: ko-build#926
Signed-off-by: Michael Gasch <[email protected]>
embano1 added a commit to embano1/ko that referenced this issue Jan 19, 2023
Closes: ko-build#926
Signed-off-by: Michael Gasch <[email protected]>
embano1 added a commit to embano1/ko that referenced this issue Jan 19, 2023
Closes: ko-build#926
Signed-off-by: Michael Gasch <[email protected]>
imjasonh added a commit that referenced this issue Jan 19, 2023
* feat: Add KO_GO_BIN env var

Closes: #926
Signed-off-by: Michael Gasch <[email protected]>

* Update docs/configuration.md

Signed-off-by: Michael Gasch <[email protected]>
Co-authored-by: Jason Hall <[email protected]>
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 a pull request may close this issue.

2 participants