Closed amolpratap-singh closed 1 month ago
20.0.1 was generated for 1.28.x Kubernetes APIs, it's only guaranteed to work against Kubernetes 1.26, 27 and 28. We've regenerated for 1.30 at HEAD and we need to cut a release. Can you test against HEAD and see if it works?
I tested with the HEAD tag on Kubernetes versions 1.30
and 1.28
, and found no issues or exceptions related to appArmorProfile field.
Thank you for the information. Could you please let me know when the new version of client-java will be available? We've identified a vulnerability in version 19.0.0, which is resolved in version 20.0.1. However, 20.0.1 has another issue as described in the ticket.
@brendandburns can u provide me answer for above query it will be helpful
@amolpratap-singh please try the 20.0.1-legacy
client version. That is built using the same code generator as 19.0.0
and it should avoid this bug also.
You'll want to eventually switch back off the legacy version to the newer code generator.
@amolpratap-singh please try the 20.0.1-legacy client version. That is built using the same code generator as 19.0.0 and it should avoid this bug also. You'll want to eventually switch back off the legacy version to the newer code generator.
Hi @brendandburns :wave: Legacy client was indeed able to gracefully ignore the new (unknown) field. From your comment I understood that client-java with new code generator will be also to handle them in the future - Is there an issue to follow that?
Description
In client-java version 20.0.1, an error was encountered related to the "appArmorProfile" field not being defined, as detailed below. The Java application, which uses client-java version 20.0.1, was deployed in a Kubernetes pod running on Kubernetes version 1.30.0.
However, when the same client-java 20.0.1 version was used with the older Kubernetes version 1.28.2, no exception related to the "appArmorProfile" field was triggered. The client-java 20.0.1 version works without issues on Kubernetes version 1.28.2.
Client Version 20.0.1
Kubernetes Version 1.30
Java Version Java 17.0.11
To Reproduce Steps to reproduce the behavior:
Write a Java client with 20.0.1 as demonstrated in the sample code below. This code will throw an exception on Kubernetes version 1.30 but not on Kubernetes version 1.28.
code
Expected behavior No exception or error should be thrown since the client-java version 20.0.1 works on Kubernetes version 1.28. However, it breaks on Kubernetes version 1.30. The expectation was that it should function without issues on both versions.
Server:
Additional context
I then modified the client-java version 20.0.1 and built it to get the jar file. The modification, as described below, resolved the issue and the exception no longer occurred, allowing it to work seamlessly.
The fix was implemented in the
V1SecurityContext.class
file at line number 317, which resulted in the successful operation.