krakend check-plugin command helps you validate the compatibility of your custom plugins that will run in conjunction with KrakenD.
The command compares your plugin’s
go.sum file with the libraries initially used to compile the running binary. If there are any incompatibilities between your plugin and KrakenD, it will show a detailed list.
If you integrate this command as part of your CI/CD pipeline, it will exit with a status code
0 when the libraries of your plugin are compatible with KrakenD and with a status code
1 when they are not.
Notice that the
check-plugin command does not check the plugin’s validity itself nor need its source code other than the
To get started writing your plugins see:
krakend check-plugin command accepts the following options:
krakend check-plugin in combination with the following flags:
--formatto let KrakenD suggest you about the
go getcommands you should launch.
--sumto specify the path to the
go.sumfile of your plugin.
--goto specify the Go version you are using to compile the plugin.
--libcto specify the libc version installed in the system. The libc version must have the preffix
DARWIN-. For instance, a plugin in Mac Monterrey might use
DARWIN-12.2.1, an Alpine container will need something like
MUSL-1.2.2, and a Linux box will have
GLIBC-2.32. To know your glibc version execute the Find GLIBC script
A quick attempt to fix your dependencies is to run the command with the
-f flag, which will suggest a series of
go get commands that you can execute to solve the incompatibilities. For instance:
Copy and paste the
go get commands in your terminal to update the dependencies. The commands are in alphabetical order.
You might need to use the
-f several times and use
go mod tidy as well.
The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.