Skip to content

Upgrade the kubernetes client library used by the Galasa service #2423

@techcobweb

Description

@techcobweb

Describe the bug

As a Galasa developer I want to use the most recent version of minikube (v1.37.0) to bring up a deployed Galasa service on my laptop, but it doesn't currently work.

Steps to reproduce

Using the latest minikube v1.37.0 with it's default settings, it pulls in a very recent version of kubernetes v1.34.0.

Galasa uses this Kubernetes client library: https://github.com/kubernetes-client/java/wiki/2.-Versioning-and-Compatibility
... which doesn't yet support kubernetes v1.34.0.

So if you deploy using just the defaults, it won't work. All the pods will come up, but the engine controller won't be able to contact the etcd service, so no queued tests will be scheduled.

Workaround

Minikube supports the concept of profiles, where each profile is a separate 'node' with a potentially different kubernetes substrate installed.

  1. When you create a minikube instance, using the first start command, specify a version of kubernetes which the kube client does support. For example:
minikube start -p v1.33.1 --kubernetes-version=v1.33.1

That will create a minikube 'profile' called v1.33.1

You can switch to use that profile using this command:

minikube profile v1.33.1

To check which profile you are in:

minikube profile

or

minikube profile list

From what I can work out, Galasa uses version 22.0.0 of the java client.
That supports at most kubernetes version 1.31.0

I see version 24.0 of that library is now available, which supports kube version 1.33.0 at best also.

So we should upgrade the library to support more recent versions of kube, but it still won't work on kubernetes v1.34.

Wondering if we can do any checks in the helm install time, or run-time to make sure that the kube version is supported by the library we have bundled. Ideas on that welcome.

The version of kube we support should also be in the documentation.

Update 18th Sept

Kube v1.34 support has been added to the main branch of the java client library (kubernetes-client/java#4245) so when v25.0 of the library is available, it should start working with the minikube defaults again.

Check if v0.25.0 is released here: https://mvnrepository.com/artifact/io.kubernetes/client-java

Tasks

Temporary fix

  • Bump the kubernetes client library up from v22.0 to v24.0

Permanent fix

  • Upgrade the version of the kubernetes library we use to v25.0 so Galasa will work on kube v1.33 and below.
  • Add docs to detail which versions of kube Galasa can work on.
  • At helm install time, check the version of Kube is supported by the client version we are using somehow. Else show an error when the Web UI starts up so it's obvious that there will be problems ahead of someone finding them.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done - in release v0.46.0/v0.46.1

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions