-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Exec generator plugins do not work on Windows #4213
Comments
Thank you for the detailed report! We are currently looking for a contributor to help us with Windows issues like this one, #4001 and #4028. Do you think this case might be the same as the one reported in #3269, where the problem was not handling Windows executable extensions? If so, I think the approach in that PR is good, though it needs tests. That said, we have an open KEP proposing deprecating this style of Exec plugin in favor of the newer KRM Functions Specification style (example / example--more docs coming soon) that specifies the executable in the config itself using a relative path from the invoking Kustomization. I suspect that it also has this issue, and would favor fixing it there (i.e. in api/internal/plugins/execplugin/execplugin.go) given the planned deprecation. /unassign |
On Windows, the exec plugin script/binary must have an executable file extension (e.g. .exe). This is so that Windows knows how to run it. When the Start method of the Cmd type in the os/exec package strategy is given a path without an extension, it attempts to discover it. This commit adds this behavior to the AbsolutePluginPath method. Resolves: kubernetes-sigs#4213 Signed-off-by: mprahl <[email protected]>
On Windows, the exec plugin script/binary must have an executable file extension (e.g. .exe). This is so that Windows knows how to run it. When the Start method of the Cmd type in the os/exec package strategy is given a path without an extension, it attempts to discover it. This commit adds this behavior to the AbsolutePluginPath method. Resolves: kubernetes-sigs#4213 Signed-off-by: mprahl <[email protected]>
On Windows, the exec plugin script/binary must have an executable file extension (e.g. .exe). This is so that Windows knows how to run it. When the Start method of the Cmd type in the os/exec package strategy is given a path without an extension, it attempts to discover it. This commit adds this behavior to the AbsolutePluginPath method. Resolves: kubernetes-sigs#4213 Signed-off-by: mprahl <[email protected]>
On Windows, the exec plugin script/binary must have an executable file extension (e.g. .exe). This is so that Windows knows how to run it. When the Start method of the Cmd type in the os/exec package strategy is given a path without an extension, it attempts to discover it. This commit adds this behavior to the AbsolutePluginPath method. Resolves: kubernetes-sigs#4213 Signed-off-by: mprahl <[email protected]>
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 |
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 |
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. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
In case anyone finds this issue in the future the workaround is just also including the |
Describe the bug
I'm unable to use an exec Kustomize generator plugin on Windows. This works for me both on Linux and MacOS.
The error is as follows:
However, the generator executable does exist:
Here is how I can reproduce it:
kustomize build --enable-alpha-plugins
Expected output
Actual output
Kustomize version
Platform
Windows
Additional context
It seems that Kustomize finds the binary before executing the generator plugin because the following error is printed when the binary is just flat out missing:
It seems that the code actually executing the binary has an issue on Windows.
The text was updated successfully, but these errors were encountered: