kudobuilder / kuttl

KUbernetes Test TooL (kuttl)
https://kuttl.dev
Apache License 2.0
673 stars 86 forks source link

Issues with release v0.13.0 #389

Open tpereirasplunk opened 2 years ago

tpereirasplunk commented 2 years ago

Running kuttl test raises the following error:

=== RUN   kuttl
    harness.go:459: starting setup
    harness.go:250: running tests using configured kubeconfig.
    harness.go:510: cleaning up
    harness.go:567: removing temp folder: ""
    harness.go:592: fatal error getting client: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

How to reproduce it (as minimally and precisely as possible): Issue wasn't seen in earlier version. Just running kuttl test cases

Environment:

kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6", GitCommit:"ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:"clean", BuildDate:"2022-04-14T08:49:13Z", GoVersion:"go1.17.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21+", GitVersion:"v1.21.14-eks-18ef993", GitCommit:"ac73613dfd25370c18cbbbc6bfc65449397b35c7", GitTreeState:"clean", BuildDate:"2022-07-06T18:06:50Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.21) exceeds the supported minor version skew of +/-1

kubectl kuttl version
KUTTL Version: version.Info{GitVersion:"0.13.0", GitCommit:"b692349", BuildDate:"2022-09-12T14:47:56Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"darwin/amd64"}

uname -a
Darwin C02D15YMMD6R 20.6.0 Darwin Kernel Version 20.6.0: Tue Jun 21 20:50:28 PDT 2022; root:xnu-7195.141.32~1/RELEASE_X86_64 x86_64
iblancasa commented 2 years ago

@tpereirasplunk what Kubernetes version are you using?

Also, the reported problem is related to 0.13.0 not 0.13.1.

tpereirasplunk commented 2 years ago

@tpereirasplunk what Kubernetes version are you using?

Also, the reported problem is related to 0.13.0 not 0.13.1.

Kubernetes version is v1.23.6. However tested with v1.24.4 as well. Same issue

iblancasa commented 2 years ago

Are you using some kind of special configuration? Could you share your kuttl-test.yaml or how you call kuttl?

tpereirasplunk commented 2 years ago

Are you using some kind of special configuration? Could you share your kuttl-test.yaml or how you call kuttl?

I call using this file>

# Entrypoint for helm automation
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./kuttl/tests/helm
parallel: 1
timeout: 1000
startKIND: false
artifactsDir: kuttl-artifacts
kindNodeCache: false
commands:
  - command: bash -c "*********"
    background: false
iblancasa commented 2 years ago

I was reading about this error and it seems is because we upgraded the Kubernetes Golang dependencies. Probably, modify this value from your kubeconfig:

 apiVersion: client.authentication.k8s.io/v1

To

 apiVersion: client.authentication.k8s.io/v1beta1

can solve the problem

tpereirasplunk commented 2 years ago

Modifying the kubeconfig leads to aws-iam-authenticator errors. Is there a way to install a specific version. Since helm only supports a single version

iblancasa commented 2 years ago

Modifying the kubeconfig leads to aws-iam-authenticator errors

Oh, I see. From what I was reading, it seems the problem is caused by the client-go Golang dependency, since it is not able to identify that API and tries to use newer.

Is there a way to install a specific version. Since helm only supports a single version

You mean for KUTTL or what? Sorry, I'm not experienced with HELM.