argoproj / gitops-engine

Democratizing GitOps
https://pkg.go.dev/github.com/argoproj/gitops-engine?tab=subdirectories
Apache License 2.0
1.67k stars 251 forks source link

gitops-engine@v0.7.3 incompatible with k8s 1.29.4 #576

Open joselitofilho opened 3 months ago

joselitofilho commented 3 months ago

I have a GoLang application that uses k8s v1.24.2, argo-cd/v2 v2.9.3 and gitops-engine v0.7.1-0.20230906152414-b0fffe419a0f (indirect). I am updating it to k8s v1.29.4 and I encountered the following error:

# github.com/argoproj/gitops-engine/pkg/utils/kube
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:249:39: too many arguments in call to apply.NewApplyFlags
        have ("k8s.io/kubectl/pkg/cmd/util".Factory, genericiooptions.IOStreams)
        want (genericiooptions.IOStreams)
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:252:22: cannot use sets.NewString() (value of type "k8s.io/apimachinery/pkg/util/sets".String) as "k8s.io/apimachinery/pkg/util/sets".Set["k8s.io/apimachinery/pkg/types".UID] value in struct literal
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:253:22: cannot use sets.NewString() (value of type "k8s.io/apimachinery/pkg/util/sets".String) as "k8s.io/apimachinery/pkg/util/sets".Set[string] value in struct literal
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:269:4: o.OpenAPISchema undefined (type *apply.ApplyOptions has no field or method OpenAPISchema)
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:270:38: cannot use validate (variable of type bool) as string value in argument to k.fact.Validator
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:278:4: o.DryRunVerifier undefined (type *apply.ApplyOptions has no field or method DryRunVerifier)
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:278:30: undefined: resource.NewDryRunVerifier
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:326:4: o.DryRunVerifier undefined (type *create.CreateOptions has no field or method DryRunVerifier)
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:326:30: undefined: resource.NewDryRunVerifier
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:375:30: undefined: resource.NewDryRunVerifier
../../../../go/pkg/mod/github.com/argoproj/gitops-engine@v0.7.3/pkg/utils/kube/resource_ops.go:375:30: too many errors

Versions after updating:

I believe this issue is connected to the issue https://github.com/argoproj/argo-cd/issues/17935 in the argo-cd project.

I hope I didn't overlook anything obvious.

Thanks, Joselito.

sivchari commented 3 months ago

@joselitofilho I opened the new pull-request to update Kubernetes library version to 0.30.1. You'll be able to resolve above error after the it is merged. Thanks.