-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Using helm with skaffold -f path/to/skaffold.yaml
throws error expecting skaffold.yaml in cwd
#5355
Comments
Thanks for opening this @j-windsor! Does this fail from the start? I tried locally and it seems to work, but in the linked issue it looks like it works initially and breaks once it gets to helm related logic. I think this might be an issue with our helm debug related code |
Should update |
@dsaydon90 might be able to answer your question. It looks like it fails when it gets to the helm logic. |
In my case, I had to run |
I tried to reproduce this as best I could given the descriptions here and in GoogleCloudPlatform/cloud-code-vscode#379. The underlying issue is that Skaffold resolves files and directories relative to the current working directory (which in this case is the VSCode workspace location), not to the location of the So because the Helm --- Kuerbenetes/skaffold.yaml.orig 2021-02-26 17:35:37.000000000 -0500
+++ Kuerbenetes/skaffold.yaml 2021-02-26 14:37:16.000000000 -0500
@@ -9,7 +9,7 @@
push: false
artifacts:
- image: project
- context: "../Application"
+ context: "Application"
docker:
dockerfile: "Dockerfile"
buildArgs:
@@ -24,10 +24,10 @@
upgrade: ['--install']
releases:
- name: project
- chartPath: project
+ chartPath: Kuerbenetes/project
namespace: local
valuesFiles:
- - "project/dev-values.yaml"
+ - "Kuerbenetes/project/dev-values.yaml"
wait: true
upgradeOnChange: true
artifactOverrides: I'll update the Skaffold docs to clarify how files are resolved. |
One thing to note: we did have a bug that was fixed in #5138 with Skaffold v1.18.0 that would have affected use of |
I see in issue GoogleCloudPlatform/cloud-code-vscode#376 that you were actually using our Cloud Code managed dependencies at the time running skaffold v1.17.2, so #5138 might be the fix that you are looking for. |
Hi @j-windsor , I have used the latest version of skaffold on that time |
@dsaydon90 where are you launching Skaffold from (what is the cwd)? Your Helm snippet references a directory named
but I don't see that directory mentioned in your directory structure:
|
Hi @briandealwis , my
|
To close this out: Skaffold generally resolves files from the current working directory, the directory from which it was invoked. This is a common idiom amongst command-line tools, and is fundamental to how
Skaffold makes some exceptions: file references with an artifact are relative to the artifact's Cloud Code for VSC executes Skaffold from the root of the workspace. So running |
From GoogleCloudPlatform/cloud-code-vscode#379
Creating on behalf of Cloud Code user @dsaydon90
Expected behavior
When running
skaffold -f path/to/skaffold.yaml
, the command knows where to find the skaffold yaml file because it is specified in the args.Actual behavior
User gets error searching for skaffold in the cwd:
skaffold config file skaffold.yaml not found - check your current working directory, or try running skaffold init
Information
The text was updated successfully, but these errors were encountered: