argo-workflows: Argo Client does not work with newer k8s client versions (>=v0.21.0)
Summary
I am using the go-client for argo and hereโs how I defined it:
opts := apiclient.Opts{
ArgoServerOpts: apiclient.ArgoServerOpts{
URL: argoURI,
Path: argoPath,
Secure: true,
InsecureSkipVerify: false,
HTTP1: true,
},
AuthSupplier: func() string {
return ""
},
}
argoCtx, argo, err := apiclient.NewClientFromOpts(opts)
if err != nil {
return "", err
}
My go.mod file:
module ...
go 1.15
require (
github.com/argoproj/argo-workflows/v3 v3.0.0
github.com/go-logr/logr v0.4.0
github.com/go-yaml/yaml v2.1.0+incompatible
github.com/onsi/ginkgo v1.14.2
github.com/onsi/gomega v1.10.4
gitlab-odx.oracledx.com/cx-sales/code/titan/titan-core v0.2.0
k8s.io/apimachinery v0.21.0
k8s.io/client-go v0.21.0
sigs.k8s.io/controller-runtime v0.7.2
)
What happened/what you expected to happen? I need to use k8s go client version >= v0.21.0 but it seems the latest argo client is incompatible with the newer k8s versions. So
Running go vet ./... gives an error:
..\..\..\..\..\go\pkg\mod\github.com\argoproj\argo-workflows\v3@v3.1.12\util\kubeconfig\kubeconfig.go:147:37: not enough arguments in call
to exec.GetAuthenticator
have (*api.ExecConfig)
want (*api.ExecConfig, *clientauthentication.Cluster)
Clearly, the exec.GetAuthenticator function requires two arguments in the newer k8s client versions. Can a bug fix be released for this purpose? Alternately, how should I define my apiClient to be compatible with the latest k8s client? Would appreciate any pointers!
Diagnostics
What Kubernetes provider are you using? Terraform
What version of Argo Workflows are you running? v0.3.12
What executor are you running? Docker/K8SAPI/Kubelet/PNS/Emissary Docker
Did this work in a previous version? I.e. is it a regression? No
Message from the maintainers:
Impacted by this bug? Give it a ๐. We prioritise the issues with the most ๐.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 27 (10 by maintainers)
Commits related to this issue
- chore: Upgrade openapi-gen to latest version. Fixes #6750 Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to alexec/argo-workflows by alexec 5 years ago
- chore: Upgrade openapi-gen to latest version. Fixes #6750 Signed-off-by: J.P. Zivalich <jp@pipekit.io> — committed to pipekit/argo-workflows by JPZ13 5 years ago
- chore: Upgrade to Kubernetes v0.23. Fixes #6750 (#7832) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 5 years ago
EDIT: I tried with the master branch version of argo. This fixes the exec.GetAuthenticator error above, but raises a bunch of other issues on running
go vet ./...: