You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you very much for the plugin SDK. Developing custom syncers is really fun.
I experienced a problem with the SDK when starting the plugin container due to a possible incompatibility of types/config. When the plugin is started, it tries to unmarshal the vcluster options from json. As far as I can see, the json looks like {"controllers":["-services", "-ingresses"],"serverCaCert":"/data/se.... So the controllers data is an array (also if only one syncer is disabled by bypassing something like --sync=-services,-ingresses into the syncer configuration.
Unfortunately this results in
panic: unmarshal vcluster options: json: cannot unmarshal array into Go struct field VirtualClusterOptions.controllers of type string
goroutine 1 [running]:
github.com/loft-sh/vcluster-sdk/plugin.MustInit(...)
/go/vcluster/vendor/github.com/loft-sh/vcluster-sdk/plugin/plugin.go:55
main.main()
/go/vcluster/main.go:11 +0x2bd
It looks like this is currently incompatible with the VirtualClusterOptions struct, defining Controllers as string only (Controllers string json:"controllers,omitempty").
For me, the problem does not happen when using devspace to develop a new plugin, but in "prod mode". This might also indicate a wrong configuration on my side 🙈.
/edit I tried to dig into the error a bit deeper: the plugin SDK seems perfectly compatible with loftsh/vcluster:0.6.0-alpha.8. With alpha.9 the types start to differ. This might have to do something with these changes.
At least this is the reason why my development env is still working. I used the example plugin as base. But I recognized too late, that it's using alpha.6 😅.
The text was updated successfully, but these errors were encountered:
First of all thank you very much for the plugin SDK. Developing custom syncers is really fun.
I experienced a problem with the SDK when starting the plugin container due to a possible incompatibility of types/config. When the plugin is started, it tries to unmarshal the vcluster options from
json
. As far as I can see, thejson
looks like{"controllers":["-services", "-ingresses"],"serverCaCert":"/data/se...
. So the controllers data is an array (also if only one syncer is disabled by bypassing something like--sync=-services,-ingresses
into thesyncer
configuration.Unfortunately this results in
It looks like this is currently incompatible with the
VirtualClusterOptions
struct, definingControllers
as string only (Controllers string json:"controllers,omitempty"
).For me, the problem does not happen when using
devspace
to develop a new plugin, but in "prod mode". This might also indicate a wrong configuration on my side 🙈./edit I tried to dig into the error a bit deeper: the plugin SDK seems perfectly compatible with
loftsh/vcluster:0.6.0-alpha.8
. Withalpha.9
the types start to differ. This might have to do something with these changes.At least this is the reason why my development env is still working. I used the example plugin as base. But I recognized too late, that it's using
alpha.6
😅.The text was updated successfully, but these errors were encountered: