I'm not sure what happens to "rotten" issues, so I've reopened the #1641 issue with the same title. I guess this can be considered a duplicate.
I am experiencing the same issue with Kustomize v3.5.4 as described in #1641:
kustomize version
{Version:kustomize/v3.5.4 GitCommit:3af514fa9f85430f0c1557c4a0291e62112ab026 BuildDate:2020-01-11T03:12:59Z GoOs:linux GoArch:amd64}
Go version:
go version
go version go1.13.9 linux/amd64
This is the output of tree:
.
โโโ build
โ โโโ omninonsense.github.io
โ โโโ v1beta
โ โโโ sopsgenerator
โ โโโ SOPSGenerator.so
โโโ build_helpers.go
โโโ docs
โ โโโ kustomize-plugins.md
โโโ examples
โ โโโ database
โ โ โโโ deployment.yaml
โ โ โโโ kustomization.yaml
โ โ โโโ postgres.env
โ โ โโโ service.yaml
โ โ โโโ sops.yaml
โ โโโ README.md
โโโ go.mod
โโโ go.sum
โโโ kustomize-sopsgenerator.code-workspace
โโโ Makefile
โโโ README.md
โโโ SOPSGenerator.go
โโโ SOPSGenerator_test.go
โโโ __test__
โโโ encrypted
โ โโโ secret.env
โ โโโ secret.json
โ โโโ secret.yaml
โโโ pgp.asc
โโโ plain
โโโ secret.env
โโโ secret.json
โโโ secret.yaml
After building the plugin, I run:
cd examples
export KUSTOMIZE_PLUGIN_HOME=$(readlink -f ../build)
kustomize build --enable_alpha_plugins database/
Which gives me:
Error: loading generator plugins: plugin /home/(โฆ)/build/omninonsense.github.io/v1beta/sopsgenerator/SOPSGenerator fails to load: plugin: not implemented
The plugin exists, though:
ls /home/(โฆ)/build/omninonsense.github.io/v1beta/sopsgenerator/
SOPSGenerator.so
Alas, I figured it out.
tl;dr: The problem was that I was downloading the kubernetes binary from the GitHub release. Installing Kustomize via go get sigs.k8s.io/kustomize/kustomize/[email protected] solves the issue.
This isn't even a _kustomize_ error that's being reported, it's an error that Go itself is reporting (the overloaded use of the term "plugin" was confusing me)
I _think_ the compiled kustomize on the release page comes without plugin support, because it was compiled with CGO_ENABLED=0. The golang.org/src/plugin/plugin_stubs.go ultimately gave me the hint to look in the right direction. I'm far from being a seasoned Go developer, so take these deductions with a pinchfistful of salt.
I will leave this open for now in case the maintainers want to look into this? If not, the @k8s-ci-robot / @fejta-bot will close it automatically.
CC-ing you since you were part of the discussion in the issue before (sorry if it's noise): @arthurgustin, @oboukili, @snarlysodboxer
In case this is just a quirk of Kustomize (whether desired or not) that's not trivial to fix, maybe it's worth documenting it somewhere? I quickly glanced over the documentation, but haven't found it being mentioned anywhere.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Will check does this still exist.
This is still happening in the latest release (v3.8.6). However, I suspect that this is intended. Since in the GO plugin guide
Need v3.0.0 for what follows, and you must compile it (not download the binary from the release page):
Awesome that it's documented now! ๐