kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
8.99k stars 2.94k forks source link

/go/pkg/mod/k8s.io/client-go@v0.27.4/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) #1286

Closed skhaz closed 1 year ago

skhaz commented 1 year ago

I just updated an application that uses client-go, which was working before. After the library upgrade, I encountered the error below. Does anyone know what the workaround is?

> [app stage-0 7/7] RUN go build -o app:                                                                                                                                      
15.33 # k8s.io/client-go/applyconfigurations/meta/v1
15.33 /go/pkg/mod/k8s.io/client-go@v0.27.4/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData
mjnovice commented 1 year ago

+1

mjnovice commented 1 year ago

seems duplicate https://github.com/kubernetes/client-go/issues/1269

mjnovice commented 1 year ago

https://github.com/kubernetes/client-go/issues/1075#issuecomment-1632677511

liggitt commented 1 year ago

https://github.com/kubernetes/client-go/issues/1075#issuecomment-1632677511 Is the recommendation… switch to using the gnostic version referenced by client-go v0.27.4

Only the v0.28.x client-go stream (ETA August 15th) works with latest gnostic definitions

shashidhar-patil commented 6 months ago

Facing it in k8s.io/client-go v0.28.1 # sigs.k8s.io/kustomize/kyaml/openapi /root/go/pkg/mod/sigs.k8s.io/kustomize/kyaml@v0.14.2/openapi/openapi.go:683:33: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to swagger.FromGnostic make: *** [Makefile:55: vet] Error 1