-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Problem statement
Im unable to use generated go-swagger server code If im using helm api in my golang code. When I run the server, I got this error:
# sigs.k8s.io/kustomize/pkg/transformers/config
../../../../../pkg/mod/sigs.k8s.io/kustomize@v2.0.3+incompatible/pkg/transformers/config/factorycrd.go:71:47: cannot use api.Schema.SchemaProps.Properties (type spec.SchemaProperties) as type myProperties in argument to looksLikeAk8sType
The similar issue is discussed in knative/client issue
Looks like this is caused by go-openapi v0.19.9 API change to SchemaProperties
. and it's not compatible with sigs.k8s.io/kustomize
that seems to be used only in helm code.
Any suggestion on how to fix this problem?
running: go mod graph | grep cli-runtime
helm.sh/helm/v3@v3.3.4 k8s.io/cli-runtime@v0.18.8
running: go mod graph | grep kustomize
k8s.io/kubectl@v0.0.0 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/kubernetes@v1.18.8 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/cli-runtime@v0.18.8 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/kubectl@v0.18.8 sigs.k8s.io/kustomize@v2.0.3+incompatible
k8s.io/cli-runtime@v0.0.0 sigs.k8s.io/kustomize@v2.0.3+incompatible
Here is the snippet of go.mod Im using.
require (
github.com/go-openapi/analysis v0.20.0 // indirect
github.com/go-openapi/errors v0.20.0
github.com/go-openapi/loads v0.20.2
github.com/go-openapi/runtime v0.19.26
github.com/go-openapi/spec v0.20.3
github.com/go-openapi/strfmt v0.20.0
github.com/go-openapi/swag v0.19.14
github.com/go-openapi/validate v0.20.2
helm.sh/helm/v3 v3.3.4
)
Environment
swagger version: 0.26.1
go version: 1.15
OS: MacOS 10.15.7