Upgrade to k8s 1.23
tommyknows opened this issue · 1 comments
I've started upgrading k8s dependency in a Go project that depends on argocd, and as such indirectly on gitops-engine too.
However, for k8s 1.23, some components in the kubectl
package had been refactored, and a build against the v0.23.1
k8s.io/*
packages fail. The problematic code can be found here: https://github.com/argoproj/gitops-engine/blob/master/pkg/utils/kube/resource_ops.go#L244
The apply.NewApplyOptions
function has been removed / split up into apply.NewApplyFlags
and applyFlags.ToOptions
. Using these is a bit problematic because they expect a cmdutil.Factory
and a *cobra.Command
.
I'd be happy to submit a patch, but am not sure what the best way to solve this would be. Maybe we can try just constructing empty ApplyOptions
and building up from there - it looks like we already set a lot of fields, maybe we set all necessary fields already.
What do you think? Should I just submit a PR so this can be discussed within the PR already?