-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
incomprehensible error message #3812
Comments
This error message means the |
Can the phrasing be fixed please?
…On Fri, Apr 16, 2021 at 1:36 PM Donny Xia ***@***.***> wrote:
This error message means the path must be a directory, so it can be used
as a build *root*.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3812 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFTEDW4674JDWZEVSVAQYLTJBYTDANCNFSM43AMZATA>
.
|
This is indeed very confusing. I have a syntax error in my
The first part of the error is kind of ok, but the second part does not make any sense here for the user. Files:
|
@Shell32-Natsu in some cases the error message might be correct. However, it appears also when there are some syntax problems within the files. Then it's very confusing. This seems to be an issue for me :) |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/assign |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
Why? |
In my case, the actual error was duplicate resource name. |
The reason why "directory must be a root" error message got appended to the actual error in @rdxmb's case is that we're only checking for HTTP error and proceeding if there's any other error here: kustomize/api/internal/target/kusttarget.go Lines 407 to 412 in c65ef48
Is there a specific reason we're ignoring other errors here? |
Does the error message " |
What we are trying to do is first try to load the resource as a file. If there is an error, proceed to try to load the resource as a directory. Perhaps it doesn't make the most sense and there may be a way to restructure the code to provide more specific error messages. |
I think the fix would be to make Another way I can think of doing this is to check if the |
I am leaving this for future reference: This error is because we must pass a directory to the kubectl apply -k <kustomization_directory> (or kubectl kustomize <kustomization_directory>) command. For example : this 'k apply -k application/' works! and this k apply -k application/application/kustomize.yaml DOES NOT!! Error message is confusing but the problem is simple :) |
minio /data/kubernetes/k3s$ sudo k3s kubectl apply -k ./minio |
In case this might help someone else: |
In
kustomize/api/loader/fileloader.go
Line 161 in a5914ab
The text was updated successfully, but these errors were encountered: