GoogleContainerTools / GoogleContainerTools/skaffold

Feature Request: Allow users to specify dependency paths

Open
#6,858 2 comments 1 reaction 0 assignees View on GitHub
area/config bugbash/q4-2022 help wanted kind/feature-request priority/p2 source/partnerships
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

#### Current State

Currently, skaffold uses CLI dependencies (e.g. kpt, kubectl) that it finds on the user's PATH. If a dependency is not on the user's PATH, skaffold displays an appropriate error message. This means that when tools invoke skaffold for a user, they may need to modify the user's PATH during the invocation in order to ensure that the correct dependencies are available to skaffold (e.g. Cloud Code's auto-managed dependencies).

#### Potential Issues

There are a few of complexities inherent in using dependencies found on the user's PATH:
* Tools like Cloud Code have no knowledge of what is already on the user's PATH, so may not be aware if they are overriding dependencies that users may intend to use
* Tools like Cloud Code may have trouble limiting the impact of a PATH change to only those dependencies it is interested in
* If all dependencies are installed to the same `bin` directory, all dependencies in that directory are added to the PATH even if only on dependency is required
* If a user has two versions of a dependency on their PATH (e.g. kpt v0.39 and kpt v1.0), skaffold will use the first dependency it encounters and there is no way for the user to specify which version to use without modifying their PATH either permanently or for a specific skaffold invocation

#### Proposal

Continue relying on PATH to find dependencies by default, but also allow users to explicitly specify dependencies to use.

##### Invocation Example

`skaffold dev --kpt /path/to/kpt --kubectl /path/to/kubectl`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.