GoogleContainerTools/skaffold

Feature Request: Allow users to specify dependency paths

Open

#6,858 opened on Nov 15, 2021

View on GitHub
 (2 comments) (1 reaction) (0 assignees)Go (12,822 stars) (1,416 forks)batch import
area/configbugbash/q4-2022help wantedkind/feature-requestpriority/p2source/partnerships

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

Feature Request: Allow users to specify dependency paths · GoogleContainerTools/skaffold#6858 | Good First Issue