Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kind version and K8s client version incompatible #1780

Open
2 of 3 tasks
renjiezh opened this issue Aug 23, 2024 · 2 comments
Open
2 of 3 tasks

Kind version and K8s client version incompatible #1780

renjiezh opened this issue Aug 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@renjiezh
Copy link
Contributor

renjiezh commented Aug 23, 2024

Describe the bug
Presubmit correctness test fails with message

io.kubernetes.client.openapi.ApiException: Message: java.lang.IllegalArgumentException: The field `volumeMounts` in the JSON string is not defined in the `V1ContainerStatus` properties. JSON: {"name":"gcp-kingdom-data-server-container","state":{"running":{"startedAt":"2024-08-22T21:13:38Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"localhost:5001/halo/kingdom/data-server:latest","imageID":"localhost:5001/halo/kingdom/data-server@sha256:bdd7e72687d7e4b415e54d2ea67b278fdb2ccee58aa518d6562922e15afb0090","containerID":"containerd://8a3d0451880911cc6885c6b6dd375bcd747f2789ec576fe026de1af3adca137a","started":true,"volumeMounts":[{"name":"config-files","mountPath":"/etc/halo-cmms/config-files","readOnly":true,"recursiveReadOnly":"Disabled"},{"name":"heap-dumps","mountPath":"/run/heap-dumps"},{"name":"gcp-kingdom-data-server-files","mountPath":"/var/run/secrets/files","readOnly":true,"recursiveReadOnly":"Disabled"},{"name":"kube-api-access-ns55w","mountPath":"/var/run/secrets/kubernetes.io/serviceaccount","readOnly":true,"recursiveReadOnly":"Disabled"}]}

It turns out the Kind version is changed by the installation script "kind-with-registry.sh". The version from the script is not explicit and seems it is using the latest version which is not supported by jvm k8s client.

The solution is :

  1. specify the Kind version during installation.
  2. Upgrade k8s client to match Kind.

Steps to reproduce
Run presubmit test.

Component(s) affected
All

Version
v0.5.8

Environment
Github workflow

Additional context

@renjiezh renjiezh added the bug Something isn't working label Aug 23, 2024
@renjiezh
Copy link
Contributor Author

A temporary fix to specify the Kind version.
#1775 (review)

@SanjayVas
Copy link
Member

SanjayVas commented Aug 27, 2024

The appropriate fix is to update the K8s client version. It looks like #1779 is intended to do this.

Pinning the Kubernetes version used by the Kind tests doesn't really help long-term, as the K8s API client is also used to interact with clusters in cloud providers (GKE/EKS). These may also upgrade to newer versions of K8s. Therefore we need to ensure that our K8s client is kept up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants