https://rancher.com/ logo
Title
c

crooked-scooter-58172

09/21/2022, 5:49 PM
Team: I need to build a harvester client in go language which can create VM. Any suggestions pls?
f

future-address-23425

09/21/2022, 5:54 PM
c

crooked-scooter-58172

09/21/2022, 5:59 PM
Thanks @future-address-23425: This API is good. However it is missing some of Harvester apis like harvesterhci.io.keypairs
Any sugegstion on how can I create my own Harvester Go client?
f

future-address-23425

09/21/2022, 6:03 PM
I think wrangler already generates all the necessary apis and schemas.
c

crooked-scooter-58172

09/21/2022, 6:11 PM
Thanks a lot @future-address-23425. Let me look into this API
✌️🏼 1
Hi @future-address-23425. I tried the API. Actually I need to use harvester client in my Kubernetes operator code which is using k8s.io/client-go v0.24.2. However, harvester client is replacing it with k8s.io/api => k8s.io/api v0.23.7. So, I am getting this error. Just wondering whether you have any suggestion for this? # k8s.io/client-go/applyconfigurations/meta/v1 ../../../GOPATH-Directory/pkg/mod/k8s.io/client-go@v0.23.7/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/googleapis/gnostic/openapiv2".Document) as type *"github.com/google/gnostic/openapiv2".Document in argument to proto.NewOpenAPIData # sigs.k8s.io/controller-runtime/pkg/cache/internal ../../../GOPATH-Directory/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.2/pkg/cache/internal/informers_map.go:238:15: ni.SetTransform undefined (type "k8s.io/client-go/tools/cache".SharedInde
f

future-address-23425

09/21/2022, 7:04 PM
if that's a strict requirement on your side, i think you have to wait for harvester to go v0.24.x, if not, you could consider downgrading
try to use the same "replace" rule in your module and check if anything else breaks
if not, downgrade is probably the fastest path
c

crooked-scooter-58172

09/21/2022, 7:55 PM
Thanks @future-address-23425