kustomize build with KUSTOMIZE_PLUGIN_HOME tries to load wrong plugin - Error: loading generator plugins: failed to load generator: expected file with Go object code at: .../plugin/v1/secret/Secret.so #5709
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened?
I am trying to follow this solution #1696 (comment) to patch a custom generator from an overlay.
$ tree . ├── generators-base │ ├── kustomization.yaml │ └── secrets.yaml ├── overlays │ └── dev │ ├── generator-config │ │ └── kustomization.yaml │ └── kustomization.yaml └── plugin └── util └── gcloudsecretgenerator └── gcloudSecretGenerator 8 directories, 5 files
generators-base/kustomization.yaml
:generators-base/secrets.yaml
:overlays/dev/generator-config/kustomization.yaml
overlays/dev/kustomization.yaml
plugin/util/gcloudsecretgenerator/gcloudSecretGenerator
I know the plugin works fine because if I try to use it for a non-overlay workflow it works fine (as demonstrated here). In this scenario however, it does not work:
$ KUSTOMIZE_PLUGIN_HOME="$(pwd)/plugin" kustomize build overlays/dev/ --enable-alpha-plugins Error: loading generator plugins: failed to load generator: expected file with Go object code at: /var/folders/9r/09jj1p_x7qd5pbfjfncq1pj00000gp/T/tmp.S0ihapiY4I/plugin/v1/secret/Secret.so
For some reason, it ignores my plugin and expects a Go object elsewhere.
What did you expect to happen?
I expected the
generator-base
secret to be patched and then expected the plugin to run properly.Expected output
Kustomize version
v5.4.1
Operating system
MacOS
The text was updated successfully, but these errors were encountered: